public sealed class QuestionServiceClientImpl : QuestionServiceClient
QuestionService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.DataQnA.V1AlphaAssembly
Google.Cloud.DataQnA.V1Alpha.dll
Remarks
Service to interpret natural language queries.
The service allows to create Question
resources that are interpreted and
are filled with one or more interpretations if the question could be
interpreted. Once a Question
resource is created and has at least one
interpretation, an interpretation can be chosen for execution, which
triggers a query to the backend (for BigQuery, it will create a job).
Upon successful execution of that interpretation, backend specific
information will be returned so that the client can retrieve the results
from the backend.
The Question
resources are named projects/*/locations/*/questions/*
.
The Question
resource has a singletion sub-resource UserFeedback
named
projects/*/locations/*/questions/*/userFeedback
, which allows access to
user feedback.
Constructors
QuestionServiceClientImpl(QuestionService.QuestionServiceClient, QuestionServiceSettings, ILogger)
public QuestionServiceClientImpl(QuestionService.QuestionServiceClient grpcClient, QuestionServiceSettings settings, ILogger logger)
Constructs a client wrapper for the QuestionService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | QuestionService.QuestionServiceClient The underlying gRPC client. |
settings | QuestionServiceSettings The base QuestionServiceSettings used within this client. |
logger | ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override QuestionService.QuestionServiceClient GrpcClient { get; }
The underlying gRPC QuestionService client
Property Value | |
---|---|
Type | Description |
QuestionService.QuestionServiceClient |
Methods
CreateQuestion(CreateQuestionRequest, CallSettings)
public override Question CreateQuestion(CreateQuestionRequest request, CallSettings callSettings = null)
Creates a question.
Parameters | |
---|---|
Name | Description |
request | CreateQuestionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
CreateQuestionAsync(CreateQuestionRequest, CallSettings)
public override Task<Question> CreateQuestionAsync(CreateQuestionRequest request, CallSettings callSettings = null)
Creates a question.
Parameters | |
---|---|
Name | Description |
request | CreateQuestionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Question> | A Task containing the RPC response. |
ExecuteQuestion(ExecuteQuestionRequest, CallSettings)
public override Question ExecuteQuestion(ExecuteQuestionRequest request, CallSettings callSettings = null)
Executes an interpretation.
Parameters | |
---|---|
Name | Description |
request | ExecuteQuestionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
ExecuteQuestionAsync(ExecuteQuestionRequest, CallSettings)
public override Task<Question> ExecuteQuestionAsync(ExecuteQuestionRequest request, CallSettings callSettings = null)
Executes an interpretation.
Parameters | |
---|---|
Name | Description |
request | ExecuteQuestionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Question> | A Task containing the RPC response. |
GetQuestion(GetQuestionRequest, CallSettings)
public override Question GetQuestion(GetQuestionRequest request, CallSettings callSettings = null)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
request | GetQuestionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
GetQuestionAsync(GetQuestionRequest, CallSettings)
public override Task<Question> GetQuestionAsync(GetQuestionRequest request, CallSettings callSettings = null)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
request | GetQuestionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Question> | A Task containing the RPC response. |
GetUserFeedback(GetUserFeedbackRequest, CallSettings)
public override UserFeedback GetUserFeedback(GetUserFeedbackRequest request, CallSettings callSettings = null)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
request | GetUserFeedbackRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UserFeedback | The RPC response. |
GetUserFeedbackAsync(GetUserFeedbackRequest, CallSettings)
public override Task<UserFeedback> GetUserFeedbackAsync(GetUserFeedbackRequest request, CallSettings callSettings = null)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
request | GetUserFeedbackRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<UserFeedback> | A Task containing the RPC response. |
UpdateUserFeedback(UpdateUserFeedbackRequest, CallSettings)
public override UserFeedback UpdateUserFeedback(UpdateUserFeedbackRequest request, CallSettings callSettings = null)
Updates user feedback. This creates user feedback if there was none before (upsert).
Parameters | |
---|---|
Name | Description |
request | UpdateUserFeedbackRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UserFeedback | The RPC response. |
UpdateUserFeedbackAsync(UpdateUserFeedbackRequest, CallSettings)
public override Task<UserFeedback> UpdateUserFeedbackAsync(UpdateUserFeedbackRequest request, CallSettings callSettings = null)
Updates user feedback. This creates user feedback if there was none before (upsert).
Parameters | |
---|---|
Name | Description |
request | UpdateUserFeedbackRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<UserFeedback> | A Task containing the RPC response. |