public abstract class PredictionServiceClient
PredictionService client wrapper, for convenient use.
Inheritance
System.Object > PredictionServiceClientNamespace
Google.Cloud.Retail.V2Assembly
Google.Cloud.Retail.V2.dll
Remarks
Service for making recommendation prediction.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the PredictionService service, which is a host of "retail.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
System.String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default PredictionService scopes.
Property Value | |
---|---|
Type | Description |
System.Collections.Generic.IReadOnlyList<System.String> |
The default PredictionService scopes are:
GrpcClient
public virtual PredictionService.PredictionServiceClient GrpcClient { get; }
The underlying gRPC PredictionService client
Property Value | |
---|---|
Type | Description |
PredictionService.PredictionServiceClient |
Methods
Create()
public static PredictionServiceClient Create()
Synchronously creates a PredictionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PredictionServiceClientBuilder.
Returns | |
---|---|
Type | Description |
PredictionServiceClient | The created PredictionServiceClient. |
CreateAsync(CancellationToken)
public static Task<PredictionServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a PredictionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PredictionServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | System.Threading.CancellationToken The System.Threading.CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
System.Threading.Tasks.Task<PredictionServiceClient> | The task representing the created PredictionServiceClient. |
Predict(PredictRequest, CallSettings)
public virtual PredictResponse Predict(PredictRequest request, CallSettings callSettings = null)
Makes a recommendation prediction.
Parameters | |
---|---|
Name | Description |
request | PredictRequest The request object containing all of the parameters for the API call. |
callSettings | Google.Api.Gax.Grpc.CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PredictResponse | The RPC response. |
PredictAsync(PredictRequest, CallSettings)
public virtual Task<PredictResponse> PredictAsync(PredictRequest request, CallSettings callSettings = null)
Makes a recommendation prediction.
Parameters | |
---|---|
Name | Description |
request | PredictRequest The request object containing all of the parameters for the API call. |
callSettings | Google.Api.Gax.Grpc.CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
System.Threading.Tasks.Task<PredictResponse> | A Task containing the RPC response. |
PredictAsync(PredictRequest, CancellationToken)
public virtual Task<PredictResponse> PredictAsync(PredictRequest request, CancellationToken cancellationToken)
Makes a recommendation prediction.
Parameters | |
---|---|
Name | Description |
request | PredictRequest The request object containing all of the parameters for the API call. |
cancellationToken | System.Threading.CancellationToken A System.Threading.CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
System.Threading.Tasks.Task<PredictResponse> | A Task containing the RPC response. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
System.Threading.Tasks.Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.