CompletionService

google.cloud.retail.v2alpha. CompletionService

Represents a CompletionService

Constructor

new CompletionService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new CompletionService 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

completeQuery(request, callback) → {undefined}

Calls CompleteQuery.

Parameters:
Name Type Description
request google.cloud.retail.v2alpha.ICompleteQueryRequest

CompleteQueryRequest message or plain object

callback google.cloud.retail.v2alpha.CompletionService.CompleteQueryCallback

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

Returns:
Type Description
undefined

completeQuery(request) → {Promise.<google.cloud.retail.v2alpha.CompleteQueryResponse>}

Calls CompleteQuery.

Parameters:
Name Type Description
request google.cloud.retail.v2alpha.ICompleteQueryRequest

CompleteQueryRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.retail.v2alpha.CompleteQueryResponse>

Promise

importCompletionData(request, callback) → {undefined}

Calls ImportCompletionData.

Parameters:
Name Type Description
request google.cloud.retail.v2alpha.IImportCompletionDataRequest

ImportCompletionDataRequest message or plain object

callback google.cloud.retail.v2alpha.CompletionService.ImportCompletionDataCallback

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

Returns:
Type Description
undefined

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

Calls ImportCompletionData.

Parameters:
Name Type Description
request google.cloud.retail.v2alpha.IImportCompletionDataRequest

ImportCompletionDataRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {CompletionService}

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

Returns:
Type Description
CompletionService

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

Type Definitions

CompleteQueryCallback(error, responseopt)

Callback as used by completeQuery.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.retail.v2alpha.CompleteQueryResponse <optional>

CompleteQueryResponse

ImportCompletionDataCallback(error, responseopt)

Callback as used by importCompletionData.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation