# Data QnA v1alpha API - Namespace Google.Cloud.DataQnA.V1Alpha (2.0.0-alpha02)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-alpha02 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha)
- [2.0.0-alpha01](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/2.0.0-alpha01/Google.Cloud.DataQnA.V1Alpha)
- [1.0.0-alpha03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/1.0.0-alpha03/Google.Cloud.DataQnA.V1Alpha)

## Classes

### [AnnotatedString](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AnnotatedString)

Describes string annotation from both semantic and formatting perspectives.
Example:

User Query:

top countries by population in Africa

0 4 14 17 28 31 37

Table Data:

- "country" - dimension
- "population" - metric
- "Africa" - value in the "continent" column

text_formatted = `"top countries by population in Africa"`

html_formatted =
`"top <b>countries</b> by <b>population</b> in <i>Africa</i>"`

    markups = [
      {DIMENSION, 4, 12}, // 'countries'
      {METRIC, 17, 26}, // 'population'
      {FILTER, 31, 36}  // 'Africa'
    ]

Note that html formattings for 'DIMENSION' and 'METRIC' are the same, while
semantic markups are different.

### [AnnotatedString.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AnnotatedString.Types)

Container for nested types declared in the AnnotatedString message type.

### [AnnotatedString.Types.SemanticMarkup](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AnnotatedString.Types.SemanticMarkup)

Semantic markup denotes a substring (by index and length) with markup
information.

### [AutoSuggestionService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionService)

This stateless API provides automatic suggestions for natural language
queries for the data sources in the provided project and location.

The service provides a resourceless operation `suggestQueries` that can be
called to get a list of suggestions for a given incomplete query and scope
(or list of scopes) under which the query is to be interpreted.

There are two types of suggestions, ENTITY for single entity suggestions
and TEMPLATE for full sentences. By default, both types are returned.

Example Request:

    GetSuggestions({
      parent: "locations/us/projects/my-project"
      scopes:
      "//bigquery.googleapis.com/projects/my-project/datasets/my-dataset/tables/my-table"
      query: "top it"
    })

The service will retrieve information based on the given scope(s) and give
suggestions based on that (e.g. "top item" for "top it" if "item" is a known
dimension for the provided scope).

    suggestions {
      suggestion_info {
        annotated_suggestion {
          text_formatted: "top item by sum of usd_revenue_net"
          markups {
            type: DIMENSION
            start_char_index: 4
            length: 4
          }
          markups {
            type: METRIC
            start_char_index: 19
            length: 15
          }
        }
        query_matches {
          start_char_index: 0
          length: 6
        }
      }
      suggestion_type: TEMPLATE
      ranking_score: 0.9
    }
    suggestions {
      suggestion_info {
        annotated_suggestion {
          text_formatted: "item"
          markups {
            type: DIMENSION
            start_char_index: 4
            length: 2
          }
        }
        query_matches {
          start_char_index: 0
          length: 6
        }
      }
      suggestion_type: ENTITY
      ranking_score: 0.8
    }

### [AutoSuggestionService.AutoSuggestionServiceBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionService.AutoSuggestionServiceBase)

Base class for server-side implementations of AutoSuggestionService

### [AutoSuggestionService.AutoSuggestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionService.AutoSuggestionServiceClient)

Client for AutoSuggestionService

### [AutoSuggestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionServiceClient)

AutoSuggestionService client wrapper, for convenient use.

### [AutoSuggestionServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionServiceClientBuilder)

Builder class for [AutoSuggestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionServiceClient) to provide simple configuration of credentials,
endpoint etc.

### [AutoSuggestionServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionServiceClientImpl)

AutoSuggestionService client wrapper implementation, for convenient use.

### [AutoSuggestionServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionServiceSettings)

Settings for [AutoSuggestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AutoSuggestionServiceClient) instances.

### [BigQueryJob](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.BigQueryJob)

BigQuery job information. This can be used to query the BigQuery API and
retrieve the current job's status (using
[jobs.get](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get)).

### [CreateQuestionRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.CreateQuestionRequest)

Request to create a question resource.

### [DataQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.DataQuery)

Representation of the data query for the backend.
This is provided for informational purposes only. Clients should not use
it to send it to the backend directly, but rather use the `execute` RPC
to trigger the execution. Using the `execute` RPC is needed in order to
track the state of a question and report on it correctly to the data
administrators.

### [DebugFlags](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.DebugFlags)

Configuriation of debug flags.

### [ExecuteQuestionRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.ExecuteQuestionRequest)

Request to execute an interpretation.

### [ExecutionInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.ExecutionInfo)

Information about the backend status (such as BigQuery) of the execution.

### [ExecutionInfo.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.ExecutionInfo.Types)

Container for nested types declared in the ExecutionInfo message type.

### [GetQuestionRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.GetQuestionRequest)

A request to get a previously created question.

### [GetUserFeedbackRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.GetUserFeedbackRequest)

Request to get user feedback.

### [HumanReadable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.HumanReadable)

Human readable interpretation.

### [InterpretError](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretError)

Details on the failure to interpret the question.

### [InterpretError.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretError.Types)

Container for nested types declared in the InterpretError message type.

### [InterpretError.Types.InterpretAmbiguityDetails](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretError.Types.InterpretAmbiguityDetails)

Details about a query that was too ambiguous. Currently, the message
has no fields and its presence signals that there was ambiguity.

### [InterpretError.Types.InterpretErrorDetails](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretError.Types.InterpretErrorDetails)

Details on interpretation failure.

### [InterpretError.Types.InterpretIncompleteQueryDetails](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretError.Types.InterpretIncompleteQueryDetails)

Details about an incomplete query.

### [InterpretError.Types.InterpretUnsupportedDetails](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretError.Types.InterpretUnsupportedDetails)

Details about unsupported parts in a query.

### [Interpretation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.Interpretation)

An interpretation of a natural language query.

### [InterpretationStructure](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretationStructure)

Information about the interpretation structure that helps to understand and
visualize the response.

### [InterpretationStructure.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretationStructure.Types)

Container for nested types declared in the InterpretationStructure message type.

### [InterpretationStructure.Types.ColumnInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretationStructure.Types.ColumnInfo)

Information about a column.

### [Question](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.Question)

The question resource represents a natural language query, its settings,
understanding generated by the system, and answer retrieval status.
A question cannot be modified.

### [QuestionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionName)

Resource name for the `Question` resource.

### [QuestionService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionService)

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.

### [QuestionService.QuestionServiceBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionService.QuestionServiceBase)

Base class for server-side implementations of QuestionService

### [QuestionService.QuestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionService.QuestionServiceClient)

Client for QuestionService

### [QuestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionServiceClient)

QuestionService client wrapper, for convenient use.

### [QuestionServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionServiceClientBuilder)

Builder class for [QuestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionServiceClient) to provide simple configuration of credentials, endpoint
etc.

### [QuestionServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionServiceClientImpl)

QuestionService client wrapper implementation, for convenient use.

### [QuestionServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionServiceSettings)

Settings for [QuestionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionServiceClient) instances.

### [SuggestQueriesRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestQueriesRequest)

Request for query suggestions.

### [SuggestQueriesResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestQueriesResponse)

Response to SuggestQueries.

### [Suggestion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.Suggestion)

A suggestion for a query with a ranking score.

### [SuggestionInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo)

Detailed information about the suggestion.

### [SuggestionInfo.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types)

Container for nested types declared in the SuggestionInfo message type.

### [SuggestionInfo.Types.MatchInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types.MatchInfo)

MatchInfo describes which part of suggestion matched with data in user
typed query. This can be used to highlight matching parts in the UI. This
is different from the annotations provided in annotated_suggestion. The
annotated_suggestion provides information about the semantic meaning, while
this provides information about how it relates to the input.

Example:
user query: `top products`

    annotated_suggestion {
     text_formatted = "top product_group"
     html_formatted = "top <b>product_group</b>"
     markups {
      {type: TEXT, start_char_index: 0, length: 3}
      {type: DIMENSION, start_char_index: 4, length: 13}
     }
    }

    query_matches {
     { start_char_index: 0, length: 3 }
     { start_char_index: 4, length: 7}
    }

### [UpdateUserFeedbackRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.UpdateUserFeedbackRequest)

Request to updates user feedback.

### [UserFeedback](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.UserFeedback)

Feedback provided by a user.

### [UserFeedback.Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.UserFeedback.Types)

Container for nested types declared in the UserFeedback message type.

### [UserFeedbackName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.UserFeedbackName)

Resource name for the `UserFeedback` resource.

## Enums

### [AnnotatedString.Types.SemanticMarkupType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.AnnotatedString.Types.SemanticMarkupType)

Semantic markup types.

### [ExecutionInfo.Types.JobExecutionState](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.ExecutionInfo.Types.JobExecutionState)

Enum of possible job execution statuses.

### [InterpretEntity](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretEntity)

Query entities of an interpretation.

### [InterpretError.Types.InterpretErrorCode](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretError.Types.InterpretErrorCode)

The interpret error code provides an error category why the interpretation
failed.

### [InterpretationStructure.Types.VisualizationType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.InterpretationStructure.Types.VisualizationType)

Enumeration of visualzation types to use for query response data.

### [QuestionName.ResourceNameType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionName.ResourceNameType)

The possible contents of [QuestionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.QuestionName).

### [SuggestionType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionType)

The type of suggestion.

### [UserFeedback.Types.UserFeedbackRating](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.UserFeedback.Types.UserFeedbackRating)

Enumeration of feedback ratings.

### [UserFeedbackName.ResourceNameType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.UserFeedbackName.ResourceNameType)

The possible contents of [UserFeedbackName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.UserFeedbackName).