PredictionService

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

batchPredict(request, callback) → {undefined}

Calls BatchPredict.

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

BatchPredictRequest message or plain object

callback google.cloud.automl.v1beta1.PredictionService.BatchPredictCallback

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

Returns:
Type Description
undefined

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

Calls BatchPredict.

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

BatchPredictRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

predict(request, callback) → {undefined}

Calls Predict.

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

PredictRequest message or plain object

callback google.cloud.automl.v1beta1.PredictionService.PredictCallback

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

Returns:
Type Description
undefined

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

Calls Predict.

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

PredictRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.automl.v1beta1.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

BatchPredictCallback(error, responseopt)

Callback as used by 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 predict.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

PredictResponse