ModelService

google.cloud.retail.v2. ModelService

Represents a ModelService

Constructor

new ModelService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new ModelService 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

createModel(request, callback) → {undefined}

Calls CreateModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.ICreateModelRequest

CreateModelRequest message or plain object

callback google.cloud.retail.v2.ModelService.CreateModelCallback

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

Returns:
Type Description
undefined

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

Calls CreateModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.ICreateModelRequest

CreateModelRequest message or plain object

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

Promise

deleteModel(request, callback) → {undefined}

Calls DeleteModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IDeleteModelRequest

DeleteModelRequest message or plain object

callback google.cloud.retail.v2.ModelService.DeleteModelCallback

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

Returns:
Type Description
undefined

deleteModel(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IDeleteModelRequest

DeleteModelRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

getModel(request, callback) → {undefined}

Calls GetModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IGetModelRequest

GetModelRequest message or plain object

callback google.cloud.retail.v2.ModelService.GetModelCallback

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

Returns:
Type Description
undefined

getModel(request) → {Promise.<google.cloud.retail.v2.Model>}

Calls GetModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IGetModelRequest

GetModelRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.retail.v2.Model>

Promise

listModels(request, callback) → {undefined}

Calls ListModels.

Parameters:
Name Type Description
request google.cloud.retail.v2.IListModelsRequest

ListModelsRequest message or plain object

callback google.cloud.retail.v2.ModelService.ListModelsCallback

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

Returns:
Type Description
undefined

listModels(request) → {Promise.<google.cloud.retail.v2.ListModelsResponse>}

Calls ListModels.

Parameters:
Name Type Description
request google.cloud.retail.v2.IListModelsRequest

ListModelsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.retail.v2.ListModelsResponse>

Promise

pauseModel(request, callback) → {undefined}

Calls PauseModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IPauseModelRequest

PauseModelRequest message or plain object

callback google.cloud.retail.v2.ModelService.PauseModelCallback

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

Returns:
Type Description
undefined

pauseModel(request) → {Promise.<google.cloud.retail.v2.Model>}

Calls PauseModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IPauseModelRequest

PauseModelRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.retail.v2.Model>

Promise

resumeModel(request, callback) → {undefined}

Calls ResumeModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IResumeModelRequest

ResumeModelRequest message or plain object

callback google.cloud.retail.v2.ModelService.ResumeModelCallback

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

Returns:
Type Description
undefined

resumeModel(request) → {Promise.<google.cloud.retail.v2.Model>}

Calls ResumeModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IResumeModelRequest

ResumeModelRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.retail.v2.Model>

Promise

tuneModel(request, callback) → {undefined}

Calls TuneModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.ITuneModelRequest

TuneModelRequest message or plain object

callback google.cloud.retail.v2.ModelService.TuneModelCallback

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

Returns:
Type Description
undefined

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

Calls TuneModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.ITuneModelRequest

TuneModelRequest message or plain object

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

Promise

updateModel(request, callback) → {undefined}

Calls UpdateModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IUpdateModelRequest

UpdateModelRequest message or plain object

callback google.cloud.retail.v2.ModelService.UpdateModelCallback

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

Returns:
Type Description
undefined

updateModel(request) → {Promise.<google.cloud.retail.v2.Model>}

Calls UpdateModel.

Parameters:
Name Type Description
request google.cloud.retail.v2.IUpdateModelRequest

UpdateModelRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.retail.v2.Model>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {ModelService}

Creates new ModelService 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
ModelService

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

Type Definitions

CreateModelCallback(error, responseopt)

Callback as used by createModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

DeleteModelCallback(error, responseopt)

Callback as used by deleteModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

GetModelCallback(error, responseopt)

Callback as used by getModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.retail.v2.Model <optional>

Model

ListModelsCallback(error, responseopt)

Callback as used by listModels.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.retail.v2.ListModelsResponse <optional>

ListModelsResponse

PauseModelCallback(error, responseopt)

Callback as used by pauseModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.retail.v2.Model <optional>

Model

ResumeModelCallback(error, responseopt)

Callback as used by resumeModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.retail.v2.Model <optional>

Model

TuneModelCallback(error, responseopt)

Callback as used by tuneModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

UpdateModelCallback(error, responseopt)

Callback as used by updateModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.retail.v2.Model <optional>

Model