Class QuestionServiceClient (1.0.0-alpha03)

public abstract class QuestionServiceClient

QuestionService client wrapper, for convenient use.

Inheritance

Object > QuestionServiceClient

Namespace

Google.Cloud.DataQnA.V1Alpha

Assembly

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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default QuestionService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default QuestionService scopes are:

GrpcClient

public virtual QuestionService.QuestionServiceClient GrpcClient { get; }

The underlying gRPC QuestionService client

Property Value
TypeDescription
QuestionService.QuestionServiceClient

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
TypeDescription
QuestionServiceClient

The created QuestionServiceClient.

CreateAsync(CancellationToken)

public static Task<QuestionServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a QuestionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use QuestionServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<QuestionServiceClient>

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
NameDescription
parentLocationName

Required. The name of the project this data source reference belongs to. Example: projects/foo/locations/bar

questionQuestion

Required. The question to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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
NameDescription
requestCreateQuestionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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
NameDescription
parentString

Required. The name of the project this data source reference belongs to. Example: projects/foo/locations/bar

questionQuestion

Required. The question to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The name of the project this data source reference belongs to. Example: projects/foo/locations/bar

questionQuestion

Required. The question to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The name of the project this data source reference belongs to. Example: projects/foo/locations/bar

questionQuestion

Required. The question to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateQuestionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateQuestionRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The name of the project this data source reference belongs to. Example: projects/foo/locations/bar

questionQuestion

Required. The question to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The name of the project this data source reference belongs to. Example: projects/foo/locations/bar

questionQuestion

Required. The question to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
requestExecuteQuestionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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, Int32, CallSettings)

public virtual Question ExecuteQuestion(string name, int interpretationIndex, CallSettings callSettings = null)

Executes an interpretation.

Parameters
NameDescription
nameString

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

interpretationIndexInt32

Required. Index of the interpretation to execute.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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
NameDescription
requestExecuteQuestionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
requestExecuteQuestionRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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, Int32, CallSettings)

public virtual Task<Question> ExecuteQuestionAsync(string name, int interpretationIndex, CallSettings callSettings = null)

Executes an interpretation.

Parameters
NameDescription
nameString

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

interpretationIndexInt32

Required. Index of the interpretation to execute.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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, Int32, CancellationToken)

public virtual Task<Question> ExecuteQuestionAsync(string name, int interpretationIndex, CancellationToken cancellationToken)

Executes an interpretation.

Parameters
NameDescription
nameString

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

interpretationIndexInt32

Required. Index of the interpretation to execute.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetQuestionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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
NameDescription
nameQuestionName

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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
NameDescription
nameString

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Question

The RPC response.

Example
// 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
NameDescription
requestGetQuestionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetQuestionRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
nameQuestionName

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
nameQuestionName

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The unique identifier for the question. Example: projects/foo/locations/bar/questions/1234

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Question>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetUserFeedbackRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
UserFeedback

The RPC response.

Example
// 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
NameDescription
nameUserFeedbackName

Required. The unique identifier for the user feedback. User feedback is a singleton resource on a Question. Example: projects/foo/locations/bar/questions/1234/userFeedback

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
UserFeedback

The RPC response.

Example
// 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
NameDescription
nameString

Required. The unique identifier for the user feedback. User feedback is a singleton resource on a Question. Example: projects/foo/locations/bar/questions/1234/userFeedback

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
UserFeedback

The RPC response.

Example
// 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
NameDescription
requestGetUserFeedbackRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetUserFeedbackRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
nameUserFeedbackName

Required. The unique identifier for the user feedback. User feedback is a singleton resource on a Question. Example: projects/foo/locations/bar/questions/1234/userFeedback

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
nameUserFeedbackName

Required. The unique identifier for the user feedback. User feedback is a singleton resource on a Question. Example: projects/foo/locations/bar/questions/1234/userFeedback

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The unique identifier for the user feedback. User feedback is a singleton resource on a Question. Example: projects/foo/locations/bar/questions/1234/userFeedback

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The unique identifier for the user feedback. User feedback is a singleton resource on a Question. Example: projects/foo/locations/bar/questions/1234/userFeedback

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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
NameDescription
requestUpdateUserFeedbackRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
UserFeedback

The RPC response.

Example
// 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
NameDescription
userFeedbackUserFeedback

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.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
UserFeedback

The RPC response.

Example
// 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
NameDescription
requestUpdateUserFeedbackRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateUserFeedbackRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
userFeedbackUserFeedback

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.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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
NameDescription
userFeedbackUserFeedback

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.

updateMaskFieldMask

The list of fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<UserFeedback>

A Task containing the RPC response.

Example
// 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);