Class protos.google.cloud.translation.v3.TranslationService

Represents a TranslationService

Inheritance

$protobuf.rpc.Service > protos.google.cloud.translation.v3.TranslationService

Package

@google-cloud/translate

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new TranslationService service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

batchTranslateDocument(request, callback)

public batchTranslateDocument(request: google.cloud.translation.v3.IBatchTranslateDocumentRequest, callback: google.cloud.translation.v3.TranslationService.BatchTranslateDocumentCallback): void;

Calls BatchTranslateDocument.

Parameters
NameDescription
request 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
TypeDescription
void

batchTranslateDocument(request)

public batchTranslateDocument(request: google.cloud.translation.v3.IBatchTranslateDocumentRequest): Promise<google.longrunning.Operation>;

Calls BatchTranslateDocument.

Parameter
NameDescription
request IBatchTranslateDocumentRequest

BatchTranslateDocumentRequest message or plain object

Returns
TypeDescription
Promise<google.longrunning.Operation>

Promise

batchTranslateText(request, callback)

public batchTranslateText(request: google.cloud.translation.v3.IBatchTranslateTextRequest, callback: google.cloud.translation.v3.TranslationService.BatchTranslateTextCallback): void;

Calls BatchTranslateText.

Parameters
NameDescription
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
TypeDescription
void

batchTranslateText(request)

public batchTranslateText(request: google.cloud.translation.v3.IBatchTranslateTextRequest): Promise<google.longrunning.Operation>;

Calls BatchTranslateText.

Parameter
NameDescription
request google.cloud.translation.v3.IBatchTranslateTextRequest

BatchTranslateTextRequest message or plain object

Returns
TypeDescription
Promise<google.longrunning.Operation>

Promise

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TranslationService;

Creates new TranslationService service using the specified rpc implementation.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
TranslationService

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

createGlossary(request, callback)

public createGlossary(request: google.cloud.translation.v3.ICreateGlossaryRequest, callback: google.cloud.translation.v3.TranslationService.CreateGlossaryCallback): void;

Calls CreateGlossary.

Parameters
NameDescription
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
TypeDescription
void

createGlossary(request)

public createGlossary(request: google.cloud.translation.v3.ICreateGlossaryRequest): Promise<google.longrunning.Operation>;

Calls CreateGlossary.

Parameter
NameDescription
request google.cloud.translation.v3.ICreateGlossaryRequest

CreateGlossaryRequest message or plain object

Returns
TypeDescription
Promise<google.longrunning.Operation>

Promise

deleteGlossary(request, callback)

public deleteGlossary(request: google.cloud.translation.v3.IDeleteGlossaryRequest, callback: google.cloud.translation.v3.TranslationService.DeleteGlossaryCallback): void;

Calls DeleteGlossary.

Parameters
NameDescription
request 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
TypeDescription
void

deleteGlossary(request)

public deleteGlossary(request: google.cloud.translation.v3.IDeleteGlossaryRequest): Promise<google.longrunning.Operation>;

Calls DeleteGlossary.

Parameter
NameDescription
request IDeleteGlossaryRequest

DeleteGlossaryRequest message or plain object

Returns
TypeDescription
Promise<google.longrunning.Operation>

Promise

detectLanguage(request, callback)

public detectLanguage(request: google.cloud.translation.v3.IDetectLanguageRequest, callback: google.cloud.translation.v3.TranslationService.DetectLanguageCallback): void;

Calls DetectLanguage.

Parameters
NameDescription
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
TypeDescription
void

detectLanguage(request)

public detectLanguage(request: google.cloud.translation.v3.IDetectLanguageRequest): Promise<google.cloud.translation.v3.DetectLanguageResponse>;

Calls DetectLanguage.

Parameter
NameDescription
request google.cloud.translation.v3.IDetectLanguageRequest

DetectLanguageRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.translation.v3.DetectLanguageResponse>

Promise

getGlossary(request, callback)

public getGlossary(request: google.cloud.translation.v3.IGetGlossaryRequest, callback: google.cloud.translation.v3.TranslationService.GetGlossaryCallback): void;

Calls GetGlossary.

Parameters
NameDescription
request 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
TypeDescription
void

getGlossary(request)

public getGlossary(request: google.cloud.translation.v3.IGetGlossaryRequest): Promise<google.cloud.translation.v3.Glossary>;

Calls GetGlossary.

Parameter
NameDescription
request IGetGlossaryRequest

GetGlossaryRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.translation.v3.Glossary>

Promise

getSupportedLanguages(request, callback)

public getSupportedLanguages(request: google.cloud.translation.v3.IGetSupportedLanguagesRequest, callback: google.cloud.translation.v3.TranslationService.GetSupportedLanguagesCallback): void;

Calls GetSupportedLanguages.

Parameters
NameDescription
request 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
TypeDescription
void

getSupportedLanguages(request)

public getSupportedLanguages(request: google.cloud.translation.v3.IGetSupportedLanguagesRequest): Promise<google.cloud.translation.v3.SupportedLanguages>;

Calls GetSupportedLanguages.

Parameter
NameDescription
request IGetSupportedLanguagesRequest

GetSupportedLanguagesRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.translation.v3.SupportedLanguages>

Promise

listGlossaries(request, callback)

public listGlossaries(request: google.cloud.translation.v3.IListGlossariesRequest, callback: google.cloud.translation.v3.TranslationService.ListGlossariesCallback): void;

Calls ListGlossaries.

Parameters
NameDescription
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
TypeDescription
void

listGlossaries(request)

public listGlossaries(request: google.cloud.translation.v3.IListGlossariesRequest): Promise<google.cloud.translation.v3.ListGlossariesResponse>;

Calls ListGlossaries.

Parameter
NameDescription
request google.cloud.translation.v3.IListGlossariesRequest

ListGlossariesRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.translation.v3.ListGlossariesResponse>

Promise

translateDocument(request, callback)

public translateDocument(request: google.cloud.translation.v3.ITranslateDocumentRequest, callback: google.cloud.translation.v3.TranslationService.TranslateDocumentCallback): void;

Calls TranslateDocument.

Parameters
NameDescription
request 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
TypeDescription
void

translateDocument(request)

public translateDocument(request: google.cloud.translation.v3.ITranslateDocumentRequest): Promise<google.cloud.translation.v3.TranslateDocumentResponse>;

Calls TranslateDocument.

Parameter
NameDescription
request ITranslateDocumentRequest

TranslateDocumentRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.translation.v3.TranslateDocumentResponse>

Promise

translateText(request, callback)

public translateText(request: google.cloud.translation.v3.ITranslateTextRequest, callback: google.cloud.translation.v3.TranslationService.TranslateTextCallback): void;

Calls TranslateText.

Parameters
NameDescription
request 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
TypeDescription
void

translateText(request)

public translateText(request: google.cloud.translation.v3.ITranslateTextRequest): Promise<google.cloud.translation.v3.TranslateTextResponse>;

Calls TranslateText.

Parameter
NameDescription
request ITranslateTextRequest

TranslateTextRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.translation.v3.TranslateTextResponse>

Promise