Retail v2 API - Class ModelService.ModelServiceClient (2.5.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

GoogleCloudGoogle.Cloud.RetailV2

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.

deadlineDateTime

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.

deadlineDateTime

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.

deadlineDateTime

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.

deadlineDateTime

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.

headers