public abstract class QuestionServiceClient
Reference documentation and code samples for the Data QnA v1alpha API class QuestionServiceClient.
QuestionService client wrapper, for convenient use.
Derived Types
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.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the QuestionService service, which is a host of "dataqna.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default QuestionService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default QuestionService scopes are:
GrpcClient
public virtual QuestionService.QuestionServiceClient GrpcClient { get; }
The underlying gRPC QuestionService client
Property Value | |
---|---|
Type | Description |
QuestionServiceQuestionServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static QuestionServiceClient Create()
Synchronously creates a QuestionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use QuestionServiceClientBuilder.
Returns | |
---|---|
Type | Description |
QuestionServiceClient | The created QuestionServiceClient. |
CreateAsync(CancellationToken)
public static Task<QuestionServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a QuestionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use QuestionServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskQuestionServiceClient | The task representing the created QuestionServiceClient. |
CreateQuestion(LocationName, Question, CallSettings)
public virtual Question CreateQuestion(LocationName parent, Question question, CallSettings callSettings = null)
Creates a question.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The name of the project this data source reference belongs to.
Example: |
question | Question Required. The question to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Question question = new Question();
// Make the request
Question response = questionServiceClient.CreateQuestion(parent, question);
CreateQuestion(CreateQuestionRequest, CallSettings)
public virtual 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. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
CreateQuestionRequest request = new CreateQuestionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Question = new Question(),
};
// Make the request
Question response = questionServiceClient.CreateQuestion(request);
CreateQuestion(string, Question, CallSettings)
public virtual Question CreateQuestion(string parent, Question question, CallSettings callSettings = null)
Creates a question.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the project this data source reference belongs to.
Example: |
question | Question Required. The question to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Question question = new Question();
// Make the request
Question response = questionServiceClient.CreateQuestion(parent, question);
CreateQuestionAsync(LocationName, Question, CallSettings)
public virtual Task<Question> CreateQuestionAsync(LocationName parent, Question question, CallSettings callSettings = null)
Creates a question.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The name of the project this data source reference belongs to.
Example: |
question | Question Required. The question to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Question question = new Question();
// Make the request
Question response = await questionServiceClient.CreateQuestionAsync(parent, question);
CreateQuestionAsync(LocationName, Question, CancellationToken)
public virtual Task<Question> CreateQuestionAsync(LocationName parent, Question question, CancellationToken cancellationToken)
Creates a question.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The name of the project this data source reference belongs to.
Example: |
question | Question Required. The question to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Question question = new Question();
// Make the request
Question response = await questionServiceClient.CreateQuestionAsync(parent, question);
CreateQuestionAsync(CreateQuestionRequest, CallSettings)
public virtual 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 |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
CreateQuestionRequest request = new CreateQuestionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Question = new Question(),
};
// Make the request
Question response = await questionServiceClient.CreateQuestionAsync(request);
CreateQuestionAsync(CreateQuestionRequest, CancellationToken)
public virtual Task<Question> CreateQuestionAsync(CreateQuestionRequest request, CancellationToken cancellationToken)
Creates a question.
Parameters | |
---|---|
Name | Description |
request | CreateQuestionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
CreateQuestionRequest request = new CreateQuestionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Question = new Question(),
};
// Make the request
Question response = await questionServiceClient.CreateQuestionAsync(request);
CreateQuestionAsync(string, Question, CallSettings)
public virtual Task<Question> CreateQuestionAsync(string parent, Question question, CallSettings callSettings = null)
Creates a question.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the project this data source reference belongs to.
Example: |
question | Question Required. The question to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Question question = new Question();
// Make the request
Question response = await questionServiceClient.CreateQuestionAsync(parent, question);
CreateQuestionAsync(string, Question, CancellationToken)
public virtual Task<Question> CreateQuestionAsync(string parent, Question question, CancellationToken cancellationToken)
Creates a question.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the project this data source reference belongs to.
Example: |
question | Question Required. The question to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Question question = new Question();
// Make the request
Question response = await questionServiceClient.CreateQuestionAsync(parent, question);
ExecuteQuestion(ExecuteQuestionRequest, CallSettings)
public virtual 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. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
ExecuteQuestionRequest request = new ExecuteQuestionRequest
{
Name = "",
InterpretationIndex = 0,
};
// Make the request
Question response = questionServiceClient.ExecuteQuestion(request);
ExecuteQuestion(string, int, CallSettings)
public virtual Question ExecuteQuestion(string name, int interpretationIndex, CallSettings callSettings = null)
Executes an interpretation.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the question.
Example: |
interpretationIndex | int Required. Index of the interpretation to execute. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
string name = "";
int interpretationIndex = 0;
// Make the request
Question response = questionServiceClient.ExecuteQuestion(name, interpretationIndex);
ExecuteQuestionAsync(ExecuteQuestionRequest, CallSettings)
public virtual 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 |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
ExecuteQuestionRequest request = new ExecuteQuestionRequest
{
Name = "",
InterpretationIndex = 0,
};
// Make the request
Question response = await questionServiceClient.ExecuteQuestionAsync(request);
ExecuteQuestionAsync(ExecuteQuestionRequest, CancellationToken)
public virtual Task<Question> ExecuteQuestionAsync(ExecuteQuestionRequest request, CancellationToken cancellationToken)
Executes an interpretation.
Parameters | |
---|---|
Name | Description |
request | ExecuteQuestionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
ExecuteQuestionRequest request = new ExecuteQuestionRequest
{
Name = "",
InterpretationIndex = 0,
};
// Make the request
Question response = await questionServiceClient.ExecuteQuestionAsync(request);
ExecuteQuestionAsync(string, int, CallSettings)
public virtual Task<Question> ExecuteQuestionAsync(string name, int interpretationIndex, CallSettings callSettings = null)
Executes an interpretation.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the question.
Example: |
interpretationIndex | int Required. Index of the interpretation to execute. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
int interpretationIndex = 0;
// Make the request
Question response = await questionServiceClient.ExecuteQuestionAsync(name, interpretationIndex);
ExecuteQuestionAsync(string, int, CancellationToken)
public virtual Task<Question> ExecuteQuestionAsync(string name, int interpretationIndex, CancellationToken cancellationToken)
Executes an interpretation.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the question.
Example: |
interpretationIndex | int Required. Index of the interpretation to execute. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
int interpretationIndex = 0;
// Make the request
Question response = await questionServiceClient.ExecuteQuestionAsync(name, interpretationIndex);
GetQuestion(GetQuestionRequest, CallSettings)
public virtual 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. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
GetQuestionRequest request = new GetQuestionRequest
{
QuestionName = QuestionName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]"),
ReadMask = new FieldMask(),
};
// Make the request
Question response = questionServiceClient.GetQuestion(request);
GetQuestion(QuestionName, CallSettings)
public virtual Question GetQuestion(QuestionName name, CallSettings callSettings = null)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
name | QuestionName Required. The unique identifier for the question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
QuestionName name = QuestionName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]");
// Make the request
Question response = questionServiceClient.GetQuestion(name);
GetQuestion(string, CallSettings)
public virtual Question GetQuestion(string name, CallSettings callSettings = null)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Question | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/questions/[QUESTION]";
// Make the request
Question response = questionServiceClient.GetQuestion(name);
GetQuestionAsync(GetQuestionRequest, CallSettings)
public virtual 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 |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
GetQuestionRequest request = new GetQuestionRequest
{
QuestionName = QuestionName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]"),
ReadMask = new FieldMask(),
};
// Make the request
Question response = await questionServiceClient.GetQuestionAsync(request);
GetQuestionAsync(GetQuestionRequest, CancellationToken)
public virtual Task<Question> GetQuestionAsync(GetQuestionRequest request, CancellationToken cancellationToken)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
request | GetQuestionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
GetQuestionRequest request = new GetQuestionRequest
{
QuestionName = QuestionName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]"),
ReadMask = new FieldMask(),
};
// Make the request
Question response = await questionServiceClient.GetQuestionAsync(request);
GetQuestionAsync(QuestionName, CallSettings)
public virtual Task<Question> GetQuestionAsync(QuestionName name, CallSettings callSettings = null)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
name | QuestionName Required. The unique identifier for the question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
QuestionName name = QuestionName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]");
// Make the request
Question response = await questionServiceClient.GetQuestionAsync(name);
GetQuestionAsync(QuestionName, CancellationToken)
public virtual Task<Question> GetQuestionAsync(QuestionName name, CancellationToken cancellationToken)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
name | QuestionName Required. The unique identifier for the question.
Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
QuestionName name = QuestionName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]");
// Make the request
Question response = await questionServiceClient.GetQuestionAsync(name);
GetQuestionAsync(string, CallSettings)
public virtual Task<Question> GetQuestionAsync(string name, CallSettings callSettings = null)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/questions/[QUESTION]";
// Make the request
Question response = await questionServiceClient.GetQuestionAsync(name);
GetQuestionAsync(string, CancellationToken)
public virtual Task<Question> GetQuestionAsync(string name, CancellationToken cancellationToken)
Gets a previously created question.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the question.
Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQuestion | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/questions/[QUESTION]";
// Make the request
Question response = await questionServiceClient.GetQuestionAsync(name);
GetUserFeedback(GetUserFeedbackRequest, CallSettings)
public virtual 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. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
GetUserFeedbackRequest request = new GetUserFeedbackRequest
{
UserFeedbackName = UserFeedbackName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]"),
};
// Make the request
UserFeedback response = questionServiceClient.GetUserFeedback(request);
GetUserFeedback(UserFeedbackName, CallSettings)
public virtual UserFeedback GetUserFeedback(UserFeedbackName name, CallSettings callSettings = null)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
name | UserFeedbackName Required. The unique identifier for the user feedback.
User feedback is a singleton resource on a Question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UserFeedback | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
UserFeedbackName name = UserFeedbackName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]");
// Make the request
UserFeedback response = questionServiceClient.GetUserFeedback(name);
GetUserFeedback(string, CallSettings)
public virtual UserFeedback GetUserFeedback(string name, CallSettings callSettings = null)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the user feedback.
User feedback is a singleton resource on a Question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UserFeedback | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/questions/[QUESTION]/userFeedback";
// Make the request
UserFeedback response = questionServiceClient.GetUserFeedback(name);
GetUserFeedbackAsync(GetUserFeedbackRequest, CallSettings)
public virtual 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 |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
GetUserFeedbackRequest request = new GetUserFeedbackRequest
{
UserFeedbackName = UserFeedbackName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]"),
};
// Make the request
UserFeedback response = await questionServiceClient.GetUserFeedbackAsync(request);
GetUserFeedbackAsync(GetUserFeedbackRequest, CancellationToken)
public virtual Task<UserFeedback> GetUserFeedbackAsync(GetUserFeedbackRequest request, CancellationToken cancellationToken)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
request | GetUserFeedbackRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
GetUserFeedbackRequest request = new GetUserFeedbackRequest
{
UserFeedbackName = UserFeedbackName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]"),
};
// Make the request
UserFeedback response = await questionServiceClient.GetUserFeedbackAsync(request);
GetUserFeedbackAsync(UserFeedbackName, CallSettings)
public virtual Task<UserFeedback> GetUserFeedbackAsync(UserFeedbackName name, CallSettings callSettings = null)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
name | UserFeedbackName Required. The unique identifier for the user feedback.
User feedback is a singleton resource on a Question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
UserFeedbackName name = UserFeedbackName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]");
// Make the request
UserFeedback response = await questionServiceClient.GetUserFeedbackAsync(name);
GetUserFeedbackAsync(UserFeedbackName, CancellationToken)
public virtual Task<UserFeedback> GetUserFeedbackAsync(UserFeedbackName name, CancellationToken cancellationToken)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
name | UserFeedbackName Required. The unique identifier for the user feedback.
User feedback is a singleton resource on a Question.
Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
UserFeedbackName name = UserFeedbackName.FromProjectLocationQuestion("[PROJECT]", "[LOCATION]", "[QUESTION]");
// Make the request
UserFeedback response = await questionServiceClient.GetUserFeedbackAsync(name);
GetUserFeedbackAsync(string, CallSettings)
public virtual Task<UserFeedback> GetUserFeedbackAsync(string name, CallSettings callSettings = null)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the user feedback.
User feedback is a singleton resource on a Question.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/questions/[QUESTION]/userFeedback";
// Make the request
UserFeedback response = await questionServiceClient.GetUserFeedbackAsync(name);
GetUserFeedbackAsync(string, CancellationToken)
public virtual Task<UserFeedback> GetUserFeedbackAsync(string name, CancellationToken cancellationToken)
Gets previously created user feedback.
Parameters | |
---|---|
Name | Description |
name | string Required. The unique identifier for the user feedback.
User feedback is a singleton resource on a Question.
Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/questions/[QUESTION]/userFeedback";
// Make the request
UserFeedback response = await questionServiceClient.GetUserFeedbackAsync(name);
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 |
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.
UpdateUserFeedback(UpdateUserFeedbackRequest, CallSettings)
public virtual 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. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
UpdateUserFeedbackRequest request = new UpdateUserFeedbackRequest
{
UserFeedback = new UserFeedback(),
UpdateMask = new FieldMask(),
};
// Make the request
UserFeedback response = questionServiceClient.UpdateUserFeedback(request);
UpdateUserFeedback(UserFeedback, FieldMask, CallSettings)
public virtual UserFeedback UpdateUserFeedback(UserFeedback userFeedback, FieldMask updateMask, CallSettings callSettings = null)
Updates user feedback. This creates user feedback if there was none before (upsert).
Parameters | |
---|---|
Name | Description |
userFeedback | UserFeedback Required. The user feedback to update. This can be called even if there is no user feedback so far. The feedback's name field is used to identify the user feedback (and the corresponding question) to update. |
updateMask | FieldMask The list of fields to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UserFeedback | The RPC response. |
// Create client
QuestionServiceClient questionServiceClient = QuestionServiceClient.Create();
// Initialize request argument(s)
UserFeedback userFeedback = new UserFeedback();
FieldMask updateMask = new FieldMask();
// Make the request
UserFeedback response = questionServiceClient.UpdateUserFeedback(userFeedback, updateMask);
UpdateUserFeedbackAsync(UpdateUserFeedbackRequest, CallSettings)
public virtual 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 |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateUserFeedbackRequest request = new UpdateUserFeedbackRequest
{
UserFeedback = new UserFeedback(),
UpdateMask = new FieldMask(),
};
// Make the request
UserFeedback response = await questionServiceClient.UpdateUserFeedbackAsync(request);
UpdateUserFeedbackAsync(UpdateUserFeedbackRequest, CancellationToken)
public virtual Task<UserFeedback> UpdateUserFeedbackAsync(UpdateUserFeedbackRequest request, CancellationToken cancellationToken)
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. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateUserFeedbackRequest request = new UpdateUserFeedbackRequest
{
UserFeedback = new UserFeedback(),
UpdateMask = new FieldMask(),
};
// Make the request
UserFeedback response = await questionServiceClient.UpdateUserFeedbackAsync(request);
UpdateUserFeedbackAsync(UserFeedback, FieldMask, CallSettings)
public virtual Task<UserFeedback> UpdateUserFeedbackAsync(UserFeedback userFeedback, FieldMask updateMask, CallSettings callSettings = null)
Updates user feedback. This creates user feedback if there was none before (upsert).
Parameters | |
---|---|
Name | Description |
userFeedback | UserFeedback Required. The user feedback to update. This can be called even if there is no user feedback so far. The feedback's name field is used to identify the user feedback (and the corresponding question) to update. |
updateMask | FieldMask The list of fields to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
UserFeedback userFeedback = new UserFeedback();
FieldMask updateMask = new FieldMask();
// Make the request
UserFeedback response = await questionServiceClient.UpdateUserFeedbackAsync(userFeedback, updateMask);
UpdateUserFeedbackAsync(UserFeedback, FieldMask, CancellationToken)
public virtual Task<UserFeedback> UpdateUserFeedbackAsync(UserFeedback userFeedback, FieldMask updateMask, CancellationToken cancellationToken)
Updates user feedback. This creates user feedback if there was none before (upsert).
Parameters | |
---|---|
Name | Description |
userFeedback | UserFeedback Required. The user feedback to update. This can be called even if there is no user feedback so far. The feedback's name field is used to identify the user feedback (and the corresponding question) to update. |
updateMask | FieldMask The list of fields to be updated. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUserFeedback | A Task containing the RPC response. |
// Create client
QuestionServiceClient questionServiceClient = await QuestionServiceClient.CreateAsync();
// Initialize request argument(s)
UserFeedback userFeedback = new UserFeedback();
FieldMask updateMask = new FieldMask();
// Make the request
UserFeedback response = await questionServiceClient.UpdateUserFeedbackAsync(userFeedback, updateMask);