Retail v2 API - Class ModelService.ModelServiceClient (2.6.0)

public class ModelService.ModelServiceClient : ClientBase<ModelService.ModelServiceClient>

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

Client for ModelService

Inheritance

object > ClientBase > ClientBaseModelServiceModelServiceClient > ModelService.ModelServiceClient

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

ModelServiceClient()

protected ModelServiceClient()

Protected parameterless constructor to allow creation of test doubles.

ModelServiceClient(CallInvoker)

public ModelServiceClient(CallInvoker callInvoker)

Creates a new client for ModelService that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ModelServiceClient(ChannelBase)

public ModelServiceClient(ChannelBase channel)

Creates a new client for ModelService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ModelServiceClient(ClientBaseConfiguration)

protected ModelServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
TypeDescription
LocationsLocationsClient

A new Locations.LocationsClient for the same target as this client.

CreateModel(CreateModelRequest, CallOptions)

public virtual Operation CreateModel(CreateModelRequest request, CallOptions options)

Creates a new model.

Parameters
NameDescription
requestCreateModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateModel(CreateModelRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation CreateModel(CreateModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new model.

Parameters
NameDescription
requestCreateModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateModelAsync(CreateModelRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> CreateModelAsync(CreateModelRequest request, CallOptions options)

Creates a new model.

Parameters
NameDescription
requestCreateModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CreateModelAsync(CreateModelRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> CreateModelAsync(CreateModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new model.

Parameters
NameDescription
requestCreateModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
OperationsOperationsClient

A new Operations client for the same target as this client.

DeleteModel(DeleteModelRequest, CallOptions)

public virtual Empty DeleteModel(DeleteModelRequest request, CallOptions options)

Deletes an existing model.

Parameters
NameDescription
requestDeleteModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteModel(DeleteModelRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteModel(DeleteModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes an existing model.

Parameters
NameDescription
requestDeleteModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteModelAsync(DeleteModelRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteModelAsync(DeleteModelRequest request, CallOptions options)

Deletes an existing model.

Parameters
NameDescription
requestDeleteModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteModelAsync(DeleteModelRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteModelAsync(DeleteModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes an existing model.

Parameters
NameDescription
requestDeleteModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

GetModel(GetModelRequest, CallOptions)

public virtual Model GetModel(GetModelRequest request, CallOptions options)

Gets a model.

Parameters
NameDescription
requestGetModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Model

The response received from the server.

GetModel(GetModelRequest, Metadata, DateTime?, CancellationToken)

public virtual Model GetModel(GetModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a model.

Parameters
NameDescription
requestGetModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Model

The response received from the server.

GetModelAsync(GetModelRequest, CallOptions)

public virtual AsyncUnaryCall<Model> GetModelAsync(GetModelRequest request, CallOptions options)

Gets a model.

Parameters
NameDescription
requestGetModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.

GetModelAsync(GetModelRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Model> GetModelAsync(GetModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a model.

Parameters
NameDescription
requestGetModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.

ListModels(ListModelsRequest, CallOptions)

public virtual ListModelsResponse ListModels(ListModelsRequest request, CallOptions options)

Lists all the models linked to this event store.

Parameters
NameDescription
requestListModelsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListModelsResponse

The response received from the server.

ListModels(ListModelsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListModelsResponse ListModels(ListModelsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all the models linked to this event store.

Parameters
NameDescription
requestListModelsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListModelsResponse

The response received from the server.

ListModelsAsync(ListModelsRequest, CallOptions)

public virtual AsyncUnaryCall<ListModelsResponse> ListModelsAsync(ListModelsRequest request, CallOptions options)

Lists all the models linked to this event store.

Parameters
NameDescription
requestListModelsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListModelsResponse

The call object.

ListModelsAsync(ListModelsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListModelsResponse> ListModelsAsync(ListModelsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all the models linked to this event store.

Parameters
NameDescription
requestListModelsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListModelsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override ModelService.ModelServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
ModelServiceModelServiceClient
Overrides

PauseModel(PauseModelRequest, CallOptions)

public virtual Model PauseModel(PauseModelRequest request, CallOptions options)

Pauses the training of an existing model.

Parameters
NameDescription
requestPauseModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Model

The response received from the server.

PauseModel(PauseModelRequest, Metadata, DateTime?, CancellationToken)

public virtual Model PauseModel(PauseModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Pauses the training of an existing model.

Parameters
NameDescription
requestPauseModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Model

The response received from the server.

PauseModelAsync(PauseModelRequest, CallOptions)

public virtual AsyncUnaryCall<Model> PauseModelAsync(PauseModelRequest request, CallOptions options)

Pauses the training of an existing model.

Parameters
NameDescription
requestPauseModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.

PauseModelAsync(PauseModelRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Model> PauseModelAsync(PauseModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Pauses the training of an existing model.

Parameters
NameDescription
requestPauseModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.

ResumeModel(ResumeModelRequest, CallOptions)

public virtual Model ResumeModel(ResumeModelRequest request, CallOptions options)

Resumes the training of an existing model.

Parameters
NameDescription
requestResumeModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Model

The response received from the server.

ResumeModel(ResumeModelRequest, Metadata, DateTime?, CancellationToken)

public virtual Model ResumeModel(ResumeModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Resumes the training of an existing model.

Parameters
NameDescription
requestResumeModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Model

The response received from the server.

ResumeModelAsync(ResumeModelRequest, CallOptions)

public virtual AsyncUnaryCall<Model> ResumeModelAsync(ResumeModelRequest request, CallOptions options)

Resumes the training of an existing model.

Parameters
NameDescription
requestResumeModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.

ResumeModelAsync(ResumeModelRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Model> ResumeModelAsync(ResumeModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Resumes the training of an existing model.

Parameters
NameDescription
requestResumeModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.

TuneModel(TuneModelRequest, CallOptions)

public virtual Operation TuneModel(TuneModelRequest request, CallOptions options)

Tunes an existing model.

Parameters
NameDescription
requestTuneModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

TuneModel(TuneModelRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation TuneModel(TuneModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Tunes an existing model.

Parameters
NameDescription
requestTuneModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

TuneModelAsync(TuneModelRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> TuneModelAsync(TuneModelRequest request, CallOptions options)

Tunes an existing model.

Parameters
NameDescription
requestTuneModelRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

TuneModelAsync(TuneModelRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> TuneModelAsync(TuneModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Tunes an existing model.

Parameters
NameDescription
requestTuneModelRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

UpdateModel(UpdateModelRequest, CallOptions)

public virtual Model UpdateModel(UpdateModelRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Model

The response received from the server.

UpdateModel(UpdateModelRequest, Metadata, DateTime?, CancellationToken)

public virtual Model UpdateModel(UpdateModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Model

The response received from the server.

UpdateModelAsync(UpdateModelRequest, CallOptions)

public virtual AsyncUnaryCall<Model> UpdateModelAsync(UpdateModelRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.

UpdateModelAsync(UpdateModelRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Model> UpdateModelAsync(UpdateModelRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineSystem.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallModel

The call object.