PredictionService

google.cloud.automl.v1. 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

(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

batchPredict(request, callback) → {undefined}

Calls BatchPredict.

Parameters:
Name Type 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

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

Calls BatchPredict.

Parameters:
Name Type Description
request google.cloud.automl.v1.IBatchPredictRequest

BatchPredictRequest message or plain object

predict(request, callback) → {undefined}

Calls Predict.

Parameters:
Name Type Description
request google.cloud.automl.v1.IPredictRequest

PredictRequest message or plain object

callback google.cloud.automl.v1.PredictionService.PredictCallback

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

predict(request) → {Promise.<google.cloud.automl.v1.PredictResponse>}

Calls Predict.

Parameters:
Name Type Description
request google.cloud.automl.v1.IPredictRequest

PredictRequest message or plain object

Type Definitions

BatchPredictCallback(error, responseopt)

Callback as used by google.cloud.automl.v1.PredictionService#batchPredict.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

PredictCallback(error, responseopt)

Callback as used by google.cloud.automl.v1.PredictionService#predict.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.automl.v1.PredictResponse <optional>

PredictResponse