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

Represents a PredictionService

Inheritance

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

Package

@google-cloud/retail

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

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

Constructs a new PredictionService service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

create(rpcImpl, requestDelimited, responseDelimited)

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

Creates new PredictionService service using the specified rpc implementation.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
PredictionService

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

predict(request, callback)

public predict(request: google.cloud.retail.v2.IPredictRequest, callback: google.cloud.retail.v2.PredictionService.PredictCallback): void;

Calls Predict.

Parameters
NameDescription
request IPredictRequest

PredictRequest message or plain object

callback PredictCallback

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

Returns
TypeDescription
void

predict(request)

public predict(request: google.cloud.retail.v2.IPredictRequest): Promise<google.cloud.retail.v2.PredictResponse>;

Calls Predict.

Parameter
NameDescription
request IPredictRequest

PredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.retail.v2.PredictResponse>

Promise