Send feedback
Class v1alpha.QuestionServiceClient (1.0.8)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.0.8 keyboard_arrow_down
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. v1alpha
Package
@google-cloud/data-qna!
Constructors
(constructor)(opts)
constructor ( opts ?: ClientOptions );
Construct an instance of QuestionServiceClient.
Parameter
Name Description opts
ClientOptions
Properties
apiEndpoint
static get apiEndpoint () : string ;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
Property Value
Type Description gax.GoogleAuth
descriptors
descriptors : Descriptors ;
Property Value
Type Description Descriptors
innerApiCalls
innerApiCalls : {
[ name : string ] : Function ;
};
Property Value
Type Description {
[name: string]: Function ;
}
pathTemplates
pathTemplates : {
[ name : string ] : gax . PathTemplate ;
};
Property Value
Type Description {
[name: string]: gax.PathTemplate ;
}
port
static get port () : number ;
The port for this API service.
Property Value
questionServiceStub
questionServiceStub ?: Promise <{
[ name : string ] : Function ;
}>;
Property Value
Type Description Promise <{
[name: string]: Function ;
}>
scopes
static get scopes () : string [];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static get servicePath () : string ;
The DNS address for this API service.
Property Value
warn
warn : ( code : string , message : string , warnType ?: string ) = > void ;
Property Value
Type Description (code: string, message: string, warnType?: string) => void
Methods
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type Description Promise <void>{Promise} A promise that resolves when the client is closed.
createQuestion(request, options)
createQuestion ( request ?: protos . google . cloud . dataqna . v1alpha . ICreateQuestionRequest , options ?: CallOptions ) : Promise <[
protos . google . cloud . dataqna . v1alpha . IQuestion ,
protos . google . cloud . dataqna . v1alpha . ICreateQuestionRequest | undefined ,
{} | undefined
]>;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.ICreateQuestionRequest
options
CallOptions
Returns
Type Description Promise <[
protos.google.cloud.dataqna.v1alpha.IQuestion ,
protos.google.cloud.dataqna.v1alpha.ICreateQuestionRequest | undefined,
{} | undefined
]>
createQuestion(request, options, callback)
createQuestion ( request : protos . google . cloud . dataqna . v1alpha . ICreateQuestionRequest , options : CallOptions , callback : Callback<protos . google . cloud . dataqna . v1alpha . IQuestion , protos . google . cloud . dataqna . v1alpha . ICreateQuestionRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.ICreateQuestionRequest
options
CallOptions
callback
Callback <protos.google.cloud.dataqna.v1alpha.IQuestion , protos.google.cloud.dataqna.v1alpha.ICreateQuestionRequest | null | undefined, {} | null | undefined>
Returns
createQuestion(request, callback)
createQuestion ( request : protos . google . cloud . dataqna . v1alpha . ICreateQuestionRequest , callback : Callback<protos . google . cloud . dataqna . v1alpha . IQuestion , protos . google . cloud . dataqna . v1alpha . ICreateQuestionRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.ICreateQuestionRequest
callback
Callback <protos.google.cloud.dataqna.v1alpha.IQuestion , protos.google.cloud.dataqna.v1alpha.ICreateQuestionRequest | null | undefined, {} | null | undefined>
Returns
executeQuestion(request, options)
executeQuestion ( request ?: protos . google . cloud . dataqna . v1alpha . IExecuteQuestionRequest , options ?: CallOptions ) : Promise <[
protos . google . cloud . dataqna . v1alpha . IQuestion ,
protos . google . cloud . dataqna . v1alpha . IExecuteQuestionRequest | undefined ,
{} | undefined
]>;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IExecuteQuestionRequest
options
CallOptions
Returns
Type Description Promise <[
protos.google.cloud.dataqna.v1alpha.IQuestion ,
protos.google.cloud.dataqna.v1alpha.IExecuteQuestionRequest | undefined,
{} | undefined
]>
executeQuestion(request, options, callback)
executeQuestion ( request : protos . google . cloud . dataqna . v1alpha . IExecuteQuestionRequest , options : CallOptions , callback : Callback<protos . google . cloud . dataqna . v1alpha . IQuestion , protos . google . cloud . dataqna . v1alpha . IExecuteQuestionRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IExecuteQuestionRequest
options
CallOptions
callback
Callback <protos.google.cloud.dataqna.v1alpha.IQuestion , protos.google.cloud.dataqna.v1alpha.IExecuteQuestionRequest | null | undefined, {} | null | undefined>
Returns
executeQuestion(request, callback)
executeQuestion ( request : protos . google . cloud . dataqna . v1alpha . IExecuteQuestionRequest , callback : Callback<protos . google . cloud . dataqna . v1alpha . IQuestion , protos . google . cloud . dataqna . v1alpha . IExecuteQuestionRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IExecuteQuestionRequest
callback
Callback <protos.google.cloud.dataqna.v1alpha.IQuestion , protos.google.cloud.dataqna.v1alpha.IExecuteQuestionRequest | null | undefined, {} | null | undefined>
Returns
getProjectId()
getProjectId () : Promise<string> ;
Returns
Type Description Promise <string>
getProjectId(callback)
getProjectId ( callback : Callback<string , undefined , undefined >) : void ;
Parameter
Name Description callback
Callback <string, undefined, undefined>
Returns
getQuestion(request, options)
getQuestion ( request ?: protos . google . cloud . dataqna . v1alpha . IGetQuestionRequest , options ?: CallOptions ) : Promise <[
protos . google . cloud . dataqna . v1alpha . IQuestion ,
protos . google . cloud . dataqna . v1alpha . IGetQuestionRequest | undefined ,
{} | undefined
]>;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IGetQuestionRequest
options
CallOptions
Returns
Type Description Promise <[
protos.google.cloud.dataqna.v1alpha.IQuestion ,
protos.google.cloud.dataqna.v1alpha.IGetQuestionRequest | undefined,
{} | undefined
]>
getQuestion(request, options, callback)
getQuestion ( request : protos . google . cloud . dataqna . v1alpha . IGetQuestionRequest , options : CallOptions , callback : Callback<protos . google . cloud . dataqna . v1alpha . IQuestion , protos . google . cloud . dataqna . v1alpha . IGetQuestionRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IGetQuestionRequest
options
CallOptions
callback
Callback <protos.google.cloud.dataqna.v1alpha.IQuestion , protos.google.cloud.dataqna.v1alpha.IGetQuestionRequest | null | undefined, {} | null | undefined>
Returns
getQuestion(request, callback)
getQuestion ( request : protos . google . cloud . dataqna . v1alpha . IGetQuestionRequest , callback : Callback<protos . google . cloud . dataqna . v1alpha . IQuestion , protos . google . cloud . dataqna . v1alpha . IGetQuestionRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IGetQuestionRequest
callback
Callback <protos.google.cloud.dataqna.v1alpha.IQuestion , protos.google.cloud.dataqna.v1alpha.IGetQuestionRequest | null | undefined, {} | null | undefined>
Returns
getUserFeedback(request, options)
getUserFeedback ( request ?: protos . google . cloud . dataqna . v1alpha . IGetUserFeedbackRequest , options ?: CallOptions ) : Promise <[
protos . google . cloud . dataqna . v1alpha . IUserFeedback ,
protos . google . cloud . dataqna . v1alpha . IGetUserFeedbackRequest | undefined ,
{} | undefined
]>;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IGetUserFeedbackRequest
options
CallOptions
Returns
Type Description Promise <[
protos.google.cloud.dataqna.v1alpha.IUserFeedback ,
protos.google.cloud.dataqna.v1alpha.IGetUserFeedbackRequest | undefined,
{} | undefined
]>
getUserFeedback(request, options, callback)
getUserFeedback ( request : protos . google . cloud . dataqna . v1alpha . IGetUserFeedbackRequest , options : CallOptions , callback : Callback<protos . google . cloud . dataqna . v1alpha . IUserFeedback , protos . google . cloud . dataqna . v1alpha . IGetUserFeedbackRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IGetUserFeedbackRequest
options
CallOptions
callback
Callback <protos.google.cloud.dataqna.v1alpha.IUserFeedback , protos.google.cloud.dataqna.v1alpha.IGetUserFeedbackRequest | null | undefined, {} | null | undefined>
Returns
getUserFeedback(request, callback)
getUserFeedback ( request : protos . google . cloud . dataqna . v1alpha . IGetUserFeedbackRequest , callback : Callback<protos . google . cloud . dataqna . v1alpha . IUserFeedback , protos . google . cloud . dataqna . v1alpha . IGetUserFeedbackRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IGetUserFeedbackRequest
callback
Callback <protos.google.cloud.dataqna.v1alpha.IUserFeedback , protos.google.cloud.dataqna.v1alpha.IGetUserFeedbackRequest | null | undefined, {} | null | undefined>
Returns
initialize()
initialize () : Promise <{
[ name : string ] : Function ;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns
Type Description Promise <{
[name: string]: Function ;
}>{Promise} A promise that resolves to an authenticated service stub.
locationPath(project, location)
locationPath ( project : string , location : string ) : string ;
Return a fully-qualified location resource name string.
Parameters
Name Description project
string
location
string
Returns
Type Description string {string} Resource name string.
matchLocationFromLocationName(locationName)
matchLocationFromLocationName ( locationName : string ) : string | number ;
Parse the location from Location resource.
Parameter
Name Description locationName
string
A fully-qualified path representing Location resource.
Returns
Type Description string | number {string} A string representing the location.
matchLocationFromQuestionName(questionName)
matchLocationFromQuestionName ( questionName : string ) : string | number ;
Parse the location from Question resource.
Parameter
Name Description questionName
string
A fully-qualified path representing Question resource.
Returns
Type Description string | number {string} A string representing the location.
matchLocationFromUserFeedbackName(userFeedbackName)
matchLocationFromUserFeedbackName ( userFeedbackName : string ) : string | number ;
Parse the location from UserFeedback resource.
Parameter
Name Description userFeedbackName
string
A fully-qualified path representing UserFeedback resource.
Returns
Type Description string | number {string} A string representing the location.
matchProjectFromLocationName(locationName)
matchProjectFromLocationName ( locationName : string ) : string | number ;
Parse the project from Location resource.
Parameter
Name Description locationName
string
A fully-qualified path representing Location resource.
Returns
Type Description string | number {string} A string representing the project.
matchProjectFromQuestionName(questionName)
matchProjectFromQuestionName ( questionName : string ) : string | number ;
Parse the project from Question resource.
Parameter
Name Description questionName
string
A fully-qualified path representing Question resource.
Returns
Type Description string | number {string} A string representing the project.
matchProjectFromUserFeedbackName(userFeedbackName)
matchProjectFromUserFeedbackName ( userFeedbackName : string ) : string | number ;
Parse the project from UserFeedback resource.
Parameter
Name Description userFeedbackName
string
A fully-qualified path representing UserFeedback resource.
Returns
Type Description string | number {string} A string representing the project.
matchQuestionFromQuestionName(questionName)
matchQuestionFromQuestionName ( questionName : string ) : string | number ;
Parse the question from Question resource.
Parameter
Name Description questionName
string
A fully-qualified path representing Question resource.
Returns
Type Description string | number {string} A string representing the question.
matchQuestionFromUserFeedbackName(userFeedbackName)
matchQuestionFromUserFeedbackName ( userFeedbackName : string ) : string | number ;
Parse the question from UserFeedback resource.
Parameter
Name Description userFeedbackName
string
A fully-qualified path representing UserFeedback resource.
Returns
Type Description string | number {string} A string representing the question.
questionPath(project, location, question)
questionPath ( project : string , location : string , question : string ) : string ;
Return a fully-qualified question resource name string.
Parameters
Name Description project
string
location
string
question
string
Returns
Type Description string {string} Resource name string.
updateUserFeedback(request, options)
updateUserFeedback ( request ?: protos . google . cloud . dataqna . v1alpha . IUpdateUserFeedbackRequest , options ?: CallOptions ) : Promise <[
protos . google . cloud . dataqna . v1alpha . IUserFeedback ,
( protos . google . cloud . dataqna . v1alpha . IUpdateUserFeedbackRequest | undefined ),
{} | undefined
]>;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IUpdateUserFeedbackRequest
options
CallOptions
Returns
Type Description Promise <[
protos.google.cloud.dataqna.v1alpha.IUserFeedback ,
(protos.google.cloud.dataqna.v1alpha.IUpdateUserFeedbackRequest | undefined),
{} | undefined
]>
updateUserFeedback(request, options, callback)
updateUserFeedback ( request : protos . google . cloud . dataqna . v1alpha . IUpdateUserFeedbackRequest , options : CallOptions , callback : Callback<protos . google . cloud . dataqna . v1alpha . IUserFeedback , protos . google . cloud . dataqna . v1alpha . IUpdateUserFeedbackRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IUpdateUserFeedbackRequest
options
CallOptions
callback
Callback <protos.google.cloud.dataqna.v1alpha.IUserFeedback , protos.google.cloud.dataqna.v1alpha.IUpdateUserFeedbackRequest | null | undefined, {} | null | undefined>
Returns
updateUserFeedback(request, callback)
updateUserFeedback ( request : protos . google . cloud . dataqna . v1alpha . IUpdateUserFeedbackRequest , callback : Callback<protos . google . cloud . dataqna . v1alpha . IUserFeedback , protos . google . cloud . dataqna . v1alpha . IUpdateUserFeedbackRequest | null | undefined , {} | null | undefined >) : void ;
Parameters
Name Description request
protos.google.cloud.dataqna.v1alpha.IUpdateUserFeedbackRequest
callback
Callback <protos.google.cloud.dataqna.v1alpha.IUserFeedback , protos.google.cloud.dataqna.v1alpha.IUpdateUserFeedbackRequest | null | undefined, {} | null | undefined>
Returns
userFeedbackPath(project, location, question)
userFeedbackPath ( project : string , location : string , question : string ) : string ;
Return a fully-qualified userFeedback resource name string.
Parameters
Name Description project
string
location
string
question
string
Returns
Type Description string {string} Resource name string.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]