Class protos.google.cloud.language.v1beta2.LanguageService (5.2.2)

Represents a LanguageService

Inheritance

$protobuf.rpc.Service > protos.google.cloud.language.v1beta2.LanguageService

Package

@google-cloud/language

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

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

Constructs a new LanguageService service.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

analyzeEntities(request, callback)

public analyzeEntities(request: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback): void;

Calls AnalyzeEntities.

Parameters
Name Description
request IAnalyzeEntitiesRequest

AnalyzeEntitiesRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback

Node-style callback called with the error, if any, and AnalyzeEntitiesResponse

Returns
Type Description
void

analyzeEntities(request)

public analyzeEntities(request: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest): Promise<google.cloud.language.v1beta2.AnalyzeEntitiesResponse>;

Calls AnalyzeEntities.

Parameter
Name Description
request IAnalyzeEntitiesRequest

AnalyzeEntitiesRequest message or plain object

Returns
Type Description
Promise<google.cloud.language.v1beta2.AnalyzeEntitiesResponse>

Promise

analyzeEntitySentiment(request, callback)

public analyzeEntitySentiment(request: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback): void;

Calls AnalyzeEntitySentiment.

Parameters
Name Description
request IAnalyzeEntitySentimentRequest

AnalyzeEntitySentimentRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback

Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse

Returns
Type Description
void

analyzeEntitySentiment(request)

public analyzeEntitySentiment(request: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest): Promise<google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse>;

Calls AnalyzeEntitySentiment.

Parameter
Name Description
request IAnalyzeEntitySentimentRequest

AnalyzeEntitySentimentRequest message or plain object

Returns
Type Description
Promise<google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse>

Promise

analyzeSentiment(request, callback)

public analyzeSentiment(request: google.cloud.language.v1beta2.IAnalyzeSentimentRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback): void;

Calls AnalyzeSentiment.

Parameters
Name Description
request IAnalyzeSentimentRequest

AnalyzeSentimentRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback

Node-style callback called with the error, if any, and AnalyzeSentimentResponse

Returns
Type Description
void

analyzeSentiment(request)

public analyzeSentiment(request: google.cloud.language.v1beta2.IAnalyzeSentimentRequest): Promise<google.cloud.language.v1beta2.AnalyzeSentimentResponse>;

Calls AnalyzeSentiment.

Parameter
Name Description
request IAnalyzeSentimentRequest

AnalyzeSentimentRequest message or plain object

Returns
Type Description
Promise<google.cloud.language.v1beta2.AnalyzeSentimentResponse>

Promise

analyzeSyntax(request, callback)

public analyzeSyntax(request: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback): void;

Calls AnalyzeSyntax.

Parameters
Name Description
request IAnalyzeSyntaxRequest

AnalyzeSyntaxRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback

Node-style callback called with the error, if any, and AnalyzeSyntaxResponse

Returns
Type Description
void

analyzeSyntax(request)

public analyzeSyntax(request: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest): Promise<google.cloud.language.v1beta2.AnalyzeSyntaxResponse>;

Calls AnalyzeSyntax.

Parameter
Name Description
request IAnalyzeSyntaxRequest

AnalyzeSyntaxRequest message or plain object

Returns
Type Description
Promise<google.cloud.language.v1beta2.AnalyzeSyntaxResponse>

Promise

annotateText(request, callback)

public annotateText(request: google.cloud.language.v1beta2.IAnnotateTextRequest, callback: google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback): void;

Calls AnnotateText.

Parameters
Name Description
request IAnnotateTextRequest

AnnotateTextRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback

Node-style callback called with the error, if any, and AnnotateTextResponse

Returns
Type Description
void

annotateText(request)

public annotateText(request: google.cloud.language.v1beta2.IAnnotateTextRequest): Promise<google.cloud.language.v1beta2.AnnotateTextResponse>;

Calls AnnotateText.

Parameter
Name Description
request IAnnotateTextRequest

AnnotateTextRequest message or plain object

Returns
Type Description
Promise<google.cloud.language.v1beta2.AnnotateTextResponse>

Promise

classifyText(request, callback)

public classifyText(request: google.cloud.language.v1beta2.IClassifyTextRequest, callback: google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback): void;

Calls ClassifyText.

Parameters
Name Description
request IClassifyTextRequest

ClassifyTextRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback

Node-style callback called with the error, if any, and ClassifyTextResponse

Returns
Type Description
void

classifyText(request)

public classifyText(request: google.cloud.language.v1beta2.IClassifyTextRequest): Promise<google.cloud.language.v1beta2.ClassifyTextResponse>;

Calls ClassifyText.

Parameter
Name Description
request IClassifyTextRequest

ClassifyTextRequest message or plain object

Returns
Type Description
Promise<google.cloud.language.v1beta2.ClassifyTextResponse>

Promise

create(rpcImpl, requestDelimited, responseDelimited)

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

Creates new LanguageService service using the specified rpc implementation.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
Type Description
LanguageService

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