TranslationService

google.cloud.translation.v3beta1. 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

(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

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

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

Calls BatchTranslateText.

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

BatchTranslateTextRequest message or plain object

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

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

Calls CreateGlossary.

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

CreateGlossaryRequest message or plain object

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

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

Calls DeleteGlossary.

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

DeleteGlossaryRequest message or plain object

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

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

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

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

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

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

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

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

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

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

Type Definitions

BatchTranslateTextCallback(error, responseopt)

Callback as used by google.cloud.translation.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.TranslationService#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 google.cloud.translation.v3beta1.TranslationService#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 google.cloud.translation.v3beta1.TranslationService#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 google.cloud.translation.v3beta1.TranslationService#listGlossaries.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

ListGlossariesResponse

TranslateTextCallback(error, responseopt)

Callback as used by google.cloud.translation.v3beta1.TranslationService#translateText.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

TranslateTextResponse