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
(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. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Type Definitions
BatchTranslateTextCallback(error, responseopt)
Callback as used by google.cloud.translation.v3.TranslationService#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 google.cloud.translation.v3.TranslationService#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 google.cloud.translation.v3.TranslationService#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 google.cloud.translation.v3.TranslationService#detectLanguage.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3.DetectLanguageResponse |
<optional> |
DetectLanguageResponse |
GetGlossaryCallback(error, responseopt)
Callback as used by google.cloud.translation.v3.TranslationService#getGlossary.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3.Glossary |
<optional> |
Glossary |
GetSupportedLanguagesCallback(error, responseopt)
Callback as used by google.cloud.translation.v3.TranslationService#getSupportedLanguages.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3.SupportedLanguages |
<optional> |
SupportedLanguages |
ListGlossariesCallback(error, responseopt)
Callback as used by google.cloud.translation.v3.TranslationService#listGlossaries.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3.ListGlossariesResponse |
<optional> |
ListGlossariesResponse |
TranslateTextCallback(error, responseopt)
Callback as used by google.cloud.translation.v3.TranslationService#translateText.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3.TranslateTextResponse |
<optional> |
TranslateTextResponse |