Class PredictionService.PredictionServiceClient
Client for PredictionService
Inheritance
Inherited Members
Namespace: Google.Cloud.Retail.V2
Assembly: Google.Cloud.Retail.V2.dll
Syntax
public class PredictionServiceClient : ClientBase<PredictionService.PredictionServiceClient>
Constructors
PredictionServiceClient()
Protected parameterless constructor to allow creation of test doubles.
Declaration
protected PredictionServiceClient()
PredictionServiceClient(CallInvoker)
Creates a new client for PredictionService that uses a custom CallInvoker
.
Declaration
public PredictionServiceClient(CallInvoker callInvoker)
Parameters
Type | Name | Description |
---|---|---|
CallInvoker | callInvoker | The callInvoker to use to make remote calls. |
PredictionServiceClient(ChannelBase)
Creates a new client for PredictionService
Declaration
public PredictionServiceClient(ChannelBase channel)
Parameters
Type | Name | Description |
---|---|---|
ChannelBase | channel | The channel to use to make remote calls. |
PredictionServiceClient(ClientBase.ClientBaseConfiguration)
Protected constructor to allow creation of configured clients.
Declaration
protected PredictionServiceClient(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ClientBase.ClientBaseConfiguration | configuration | The client configuration. |
Methods
NewInstance(ClientBase.ClientBaseConfiguration)
Creates a new instance of client from given ClientBaseConfiguration
.
Declaration
protected override PredictionService.PredictionServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ClientBase.ClientBaseConfiguration | configuration |
Returns
Type | Description |
---|---|
PredictionService.PredictionServiceClient |
Overrides
Predict(PredictRequest, CallOptions)
Makes a recommendation prediction.
Declaration
public virtual PredictResponse Predict(PredictRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
PredictRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
PredictResponse | The response received from the server. |
Predict(PredictRequest, Metadata, Nullable<DateTime>, CancellationToken)
Makes a recommendation prediction.
Declaration
public virtual PredictResponse Predict(PredictRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
PredictRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<System.DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
System.Threading.CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
PredictResponse | The response received from the server. |
PredictAsync(PredictRequest, CallOptions)
Makes a recommendation prediction.
Declaration
public virtual AsyncUnaryCall<PredictResponse> PredictAsync(PredictRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
PredictRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<PredictResponse> | The call object. |
PredictAsync(PredictRequest, Metadata, Nullable<DateTime>, CancellationToken)
Makes a recommendation prediction.
Declaration
public virtual AsyncUnaryCall<PredictResponse> PredictAsync(PredictRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
PredictRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<System.DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
System.Threading.CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<PredictResponse> | The call object. |