Represents a TranslationService
Inheritance
$protobuf.rpc.Service > protos.google.cloud.translation.v3.TranslationServicePackage
@google-cloud/translateConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new TranslationService service.
Name | Description |
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.
Name | Description |
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 |
Type | Description |
void |
batchTranslateDocument(request)
public batchTranslateDocument(request: google.cloud.translation.v3.IBatchTranslateDocumentRequest): Promise<google.longrunning.Operation>;
Calls BatchTranslateDocument.
Name | Description |
request |
IBatchTranslateDocumentRequest
BatchTranslateDocumentRequest message or plain object |
Type | Description |
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.
Name | Description |
request |
IBatchTranslateTextRequest
BatchTranslateTextRequest message or plain object |
callback |
google.cloud.translation.v3.TranslationService.BatchTranslateTextCallback
Node-style callback called with the error, if any, and Operation |
Type | Description |
void |
batchTranslateText(request)
public batchTranslateText(request: google.cloud.translation.v3.IBatchTranslateTextRequest): Promise<google.longrunning.Operation>;
Calls BatchTranslateText.
Name | Description |
request |
IBatchTranslateTextRequest
BatchTranslateTextRequest message or plain object |
Type | Description |
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.
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Type | Description |
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.
Name | Description |
request |
ICreateGlossaryRequest
CreateGlossaryRequest message or plain object |
callback |
google.cloud.translation.v3.TranslationService.CreateGlossaryCallback
Node-style callback called with the error, if any, and Operation |
Type | Description |
void |
createGlossary(request)
public createGlossary(request: google.cloud.translation.v3.ICreateGlossaryRequest): Promise<google.longrunning.Operation>;
Calls CreateGlossary.
Name | Description |
request |
ICreateGlossaryRequest
CreateGlossaryRequest message or plain object |
Type | Description |
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.
Name | 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 |
Type | Description |
void |
deleteGlossary(request)
public deleteGlossary(request: google.cloud.translation.v3.IDeleteGlossaryRequest): Promise<google.longrunning.Operation>;
Calls DeleteGlossary.
Name | Description |
request |
google.cloud.translation.v3.IDeleteGlossaryRequest
DeleteGlossaryRequest message or plain object |
Type | Description |
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.
Name | 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 |
Type | Description |
void |
detectLanguage(request)
public detectLanguage(request: google.cloud.translation.v3.IDetectLanguageRequest): Promise<google.cloud.translation.v3.DetectLanguageResponse>;
Calls DetectLanguage.
Name | Description |
request |
google.cloud.translation.v3.IDetectLanguageRequest
DetectLanguageRequest message or plain object |
Type | Description |
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.
Name | Description |
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 |
Type | Description |
void |
getGlossary(request)
public getGlossary(request: google.cloud.translation.v3.IGetGlossaryRequest): Promise<google.cloud.translation.v3.Glossary>;
Calls GetGlossary.
Name | Description |
request |
IGetGlossaryRequest
GetGlossaryRequest message or plain object |
Type | Description |
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.
Name | Description |
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 |
Type | Description |
void |
getSupportedLanguages(request)
public getSupportedLanguages(request: google.cloud.translation.v3.IGetSupportedLanguagesRequest): Promise<google.cloud.translation.v3.SupportedLanguages>;
Calls GetSupportedLanguages.
Name | Description |
request |
IGetSupportedLanguagesRequest
GetSupportedLanguagesRequest message or plain object |
Type | Description |
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.
Name | Description |
request |
IListGlossariesRequest
ListGlossariesRequest message or plain object |
callback |
google.cloud.translation.v3.TranslationService.ListGlossariesCallback
Node-style callback called with the error, if any, and ListGlossariesResponse |
Type | Description |
void |
listGlossaries(request)
public listGlossaries(request: google.cloud.translation.v3.IListGlossariesRequest): Promise<google.cloud.translation.v3.ListGlossariesResponse>;
Calls ListGlossaries.
Name | Description |
request |
IListGlossariesRequest
ListGlossariesRequest message or plain object |
Type | Description |
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.
Name | Description |
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 |
Type | Description |
void |
translateDocument(request)
public translateDocument(request: google.cloud.translation.v3.ITranslateDocumentRequest): Promise<google.cloud.translation.v3.TranslateDocumentResponse>;
Calls TranslateDocument.
Name | Description |
request |
ITranslateDocumentRequest
TranslateDocumentRequest message or plain object |
Type | Description |
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.
Name | Description |
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 |
Type | Description |
void |
translateText(request)
public translateText(request: google.cloud.translation.v3.ITranslateTextRequest): Promise<google.cloud.translation.v3.TranslateTextResponse>;
Calls TranslateText.
Name | Description |
request |
ITranslateTextRequest
TranslateTextRequest message or plain object |
Type | Description |
Promise<google.cloud.translation.v3.TranslateTextResponse> | Promise |