PredictionService

google.cloud.retail.v2beta. PredictionService

Represents a PredictionService

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.v2beta.IPredictRequest

PredictRequest message or plain object

callback google.cloud.retail.v2beta.PredictionService.PredictCallback

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

Returns:
Type Description
undefined

predict(request) → {Promise.<google.cloud.retail.v2beta.PredictResponse>}

Calls Predict.

Parameters:
Name Type Description
request google.cloud.retail.v2beta.IPredictRequest

PredictRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.retail.v2beta.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.v2beta.PredictResponse <optional>

PredictResponse