Class protos.google.cloud.retail.v2.CompletionService (3.1.0)

Represents a CompletionService

Inheritance

$protobuf.rpc.Service > protos.google.cloud.retail.v2.CompletionService

Package

@google-cloud/retail

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

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

Constructs a new CompletionService service.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

completeQuery(request, callback)

public completeQuery(request: google.cloud.retail.v2.ICompleteQueryRequest, callback: google.cloud.retail.v2.CompletionService.CompleteQueryCallback): void;

Calls CompleteQuery.

Parameters
Name Description
request ICompleteQueryRequest

CompleteQueryRequest message or plain object

callback CompleteQueryCallback

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

Returns
Type Description
void

completeQuery(request)

public completeQuery(request: google.cloud.retail.v2.ICompleteQueryRequest): Promise<google.cloud.retail.v2.CompleteQueryResponse>;

Calls CompleteQuery.

Parameter
Name Description
request ICompleteQueryRequest

CompleteQueryRequest message or plain object

Returns
Type Description
Promise<google.cloud.retail.v2.CompleteQueryResponse>

Promise

create(rpcImpl, requestDelimited, responseDelimited)

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

Creates new CompletionService 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
CompletionService

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

importCompletionData(request, callback)

public importCompletionData(request: google.cloud.retail.v2.IImportCompletionDataRequest, callback: google.cloud.retail.v2.CompletionService.ImportCompletionDataCallback): void;

Calls ImportCompletionData.

Parameters
Name Description
request IImportCompletionDataRequest

ImportCompletionDataRequest message or plain object

callback ImportCompletionDataCallback

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

Returns
Type Description
void

importCompletionData(request)

public importCompletionData(request: google.cloud.retail.v2.IImportCompletionDataRequest): Promise<google.longrunning.Operation>;

Calls ImportCompletionData.

Parameter
Name Description
request IImportCompletionDataRequest

ImportCompletionDataRequest message or plain object

Returns
Type Description
Promise<google.longrunning.Operation>

Promise