Retail v2 API - Class ModelServiceClientImpl (2.6.0)

public sealed class ModelServiceClientImpl : ModelServiceClient

Reference documentation and code samples for the Retail v2 API class ModelServiceClientImpl.

ModelService client wrapper implementation, for convenient use.

Inheritance

object > ModelServiceClient > ModelServiceClientImpl

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Remarks

Service for performing CRUD operations on models. Recommendation models contain all the metadata necessary to generate a set of models for the Predict() API. A model is queried indirectly via a ServingConfig, which associates a model with a given Placement (e.g. Frequently Bought Together on Home Page).

This service allows you to do the following:

  • Initiate training of a model.
  • Pause training of an existing model.
  • List all the available models along with their metadata.
  • Control their tuning schedule.

Constructors

ModelServiceClientImpl(ModelServiceClient, ModelServiceSettings, ILogger)

public ModelServiceClientImpl(ModelService.ModelServiceClient grpcClient, ModelServiceSettings settings, ILogger logger)

Constructs a client wrapper for the ModelService service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientModelServiceModelServiceClient

The underlying gRPC client.

settingsModelServiceSettings

The base ModelServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

CreateModelOperationsClient

public override OperationsClient CreateModelOperationsClient { get; }

The long-running operations client for CreateModel.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override ModelService.ModelServiceClient GrpcClient { get; }

The underlying gRPC ModelService client

Property Value
TypeDescription
ModelServiceModelServiceClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient
Overrides

TuneModelOperationsClient

public override OperationsClient TuneModelOperationsClient { get; }

The long-running operations client for TuneModel.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

CreateModel(CreateModelRequest, CallSettings)

public override Operation<Model, CreateModelMetadata> CreateModel(CreateModelRequest request, CallSettings callSettings = null)

Creates a new model.

Parameters
NameDescription
requestCreateModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationModelCreateModelMetadata

The RPC response.

Overrides

CreateModelAsync(CreateModelRequest, CallSettings)

public override Task<Operation<Model, CreateModelMetadata>> CreateModelAsync(CreateModelRequest request, CallSettings callSettings = null)

Creates a new model.

Parameters
NameDescription
requestCreateModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationModelCreateModelMetadata

A Task containing the RPC response.

Overrides

DeleteModel(DeleteModelRequest, CallSettings)

public override void DeleteModel(DeleteModelRequest request, CallSettings callSettings = null)

Deletes an existing model.

Parameters
NameDescription
requestDeleteModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteModelAsync(DeleteModelRequest, CallSettings)

public override Task DeleteModelAsync(DeleteModelRequest request, CallSettings callSettings = null)

Deletes an existing model.

Parameters
NameDescription
requestDeleteModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

GetModel(GetModelRequest, CallSettings)

public override Model GetModel(GetModelRequest request, CallSettings callSettings = null)

Gets a model.

Parameters
NameDescription
requestGetModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Overrides

GetModelAsync(GetModelRequest, CallSettings)

public override Task<Model> GetModelAsync(GetModelRequest request, CallSettings callSettings = null)

Gets a model.

Parameters
NameDescription
requestGetModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

Overrides

ListModels(ListModelsRequest, CallSettings)

public override PagedEnumerable<ListModelsResponse, Model> ListModels(ListModelsRequest request, CallSettings callSettings = null)

Lists all the models linked to this event store.

Parameters
NameDescription
requestListModelsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListModelsResponseModel

A pageable sequence of Model resources.

Overrides

ListModelsAsync(ListModelsRequest, CallSettings)

public override PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(ListModelsRequest request, CallSettings callSettings = null)

Lists all the models linked to this event store.

Parameters
NameDescription
requestListModelsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListModelsResponseModel

A pageable asynchronous sequence of Model resources.

Overrides

PauseModel(PauseModelRequest, CallSettings)

public override Model PauseModel(PauseModelRequest request, CallSettings callSettings = null)

Pauses the training of an existing model.

Parameters
NameDescription
requestPauseModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Overrides

PauseModelAsync(PauseModelRequest, CallSettings)

public override Task<Model> PauseModelAsync(PauseModelRequest request, CallSettings callSettings = null)

Pauses the training of an existing model.

Parameters
NameDescription
requestPauseModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

Overrides

ResumeModel(ResumeModelRequest, CallSettings)

public override Model ResumeModel(ResumeModelRequest request, CallSettings callSettings = null)

Resumes the training of an existing model.

Parameters
NameDescription
requestResumeModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Overrides

ResumeModelAsync(ResumeModelRequest, CallSettings)

public override Task<Model> ResumeModelAsync(ResumeModelRequest request, CallSettings callSettings = null)

Resumes the training of an existing model.

Parameters
NameDescription
requestResumeModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

Overrides

TuneModel(TuneModelRequest, CallSettings)

public override Operation<TuneModelResponse, TuneModelMetadata> TuneModel(TuneModelRequest request, CallSettings callSettings = null)

Tunes an existing model.

Parameters
NameDescription
requestTuneModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationTuneModelResponseTuneModelMetadata

The RPC response.

Overrides

TuneModelAsync(TuneModelRequest, CallSettings)

public override Task<Operation<TuneModelResponse, TuneModelMetadata>> TuneModelAsync(TuneModelRequest request, CallSettings callSettings = null)

Tunes an existing model.

Parameters
NameDescription
requestTuneModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationTuneModelResponseTuneModelMetadata

A Task containing the RPC response.

Overrides

UpdateModel(UpdateModelRequest, CallSettings)

public override Model UpdateModel(UpdateModelRequest request, CallSettings callSettings = null)

Update of model metadata. Only fields that currently can be updated are: filtering_option and periodic_tuning_state. If other values are provided, this API method ignores them.

Parameters
NameDescription
requestUpdateModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Overrides

UpdateModelAsync(UpdateModelRequest, CallSettings)

public override Task<Model> UpdateModelAsync(UpdateModelRequest request, CallSettings callSettings = null)

Update of model metadata. Only fields that currently can be updated are: filtering_option and periodic_tuning_state. If other values are provided, this API method ignores them.

Parameters
NameDescription
requestUpdateModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

Overrides