Constructor
new PredictionService(rpcImpl, requestDelimitedopt, responseDelimitedopt)
Constructs a new PredictionService 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
predict(request, callback) → {undefined}
Calls Predict.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.retail.v2.IPredictRequest |
PredictRequest message or plain object |
callback |
google.cloud.retail.v2.PredictionService.PredictCallback |
Node-style callback called with the error, if any, and PredictResponse |
Returns:
Type | Description |
---|---|
undefined |
predict(request) → {Promise.<google.cloud.retail.v2.PredictResponse>}
Calls Predict.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.retail.v2.IPredictRequest |
PredictRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.retail.v2.PredictResponse> |
Promise |
(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {PredictionService}
Creates new PredictionService 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 |
---|---|
PredictionService |
RPC service. Useful where requests and/or responses are streamed. |
Type Definitions
PredictCallback(error, responseopt)
Callback as used by predict.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.retail.v2.PredictResponse |
<optional> |
PredictResponse |