Represents a PredictionService
Inheritance
$protobuf.rpc.Service > protos.google.cloud.automl.v1.PredictionServicePackage
@google-cloud/automlConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new PredictionService service.
Parameters | |
---|---|
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Methods
batchPredict(request, callback)
public batchPredict(request: google.cloud.automl.v1.IBatchPredictRequest, callback: google.cloud.automl.v1.PredictionService.BatchPredictCallback): void;
Calls BatchPredict.
Parameters | |
---|---|
Name | Description |
request |
google.cloud.automl.v1.IBatchPredictRequest
BatchPredictRequest message or plain object |
callback |
google.cloud.automl.v1.PredictionService.BatchPredictCallback
Node-style callback called with the error, if any, and Operation |
Returns | |
---|---|
Type | Description |
void |
batchPredict(request)
public batchPredict(request: google.cloud.automl.v1.IBatchPredictRequest): Promise<google.longrunning.Operation>;
Calls BatchPredict.
Parameter | |
---|---|
Name | Description |
request |
google.cloud.automl.v1.IBatchPredictRequest
BatchPredictRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.longrunning.Operation> | Promise |
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 | |
---|---|
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Returns | |
---|---|
Type | Description |
PredictionService | RPC service. Useful where requests and/or responses are streamed. |
predict(request, callback)
public predict(request: google.cloud.automl.v1.IPredictRequest, callback: google.cloud.automl.v1.PredictionService.PredictCallback): void;
Calls Predict.
Parameters | |
---|---|
Name | Description |
request |
IPredictRequest
PredictRequest message or plain object |
callback |
google.cloud.automl.v1.PredictionService.PredictCallback
Node-style callback called with the error, if any, and PredictResponse |
Returns | |
---|---|
Type | Description |
void |
predict(request)
public predict(request: google.cloud.automl.v1.IPredictRequest): Promise<google.cloud.automl.v1.PredictResponse>;
Calls Predict.
Parameter | |
---|---|
Name | Description |
request |
IPredictRequest
PredictRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.cloud.automl.v1.PredictResponse> | Promise |