google-cloud-dataqna-v1alpha 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +139 -0
- data/lib/google-cloud-dataqna-v1alpha.rb +21 -0
- data/lib/google/cloud/dataqna/v1alpha.rb +39 -0
- data/lib/google/cloud/dataqna/v1alpha/annotated_string_pb.rb +40 -0
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service.rb +114 -0
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/client.rb +459 -0
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/credentials.rb +51 -0
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/paths.rb +50 -0
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service_pb.rb +56 -0
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service_services_pb.rb +111 -0
- data/lib/google/cloud/dataqna/v1alpha/question_pb.rb +155 -0
- data/lib/google/cloud/dataqna/v1alpha/question_service.rb +63 -0
- data/lib/google/cloud/dataqna/v1alpha/question_service/client.rb +712 -0
- data/lib/google/cloud/dataqna/v1alpha/question_service/credentials.rb +51 -0
- data/lib/google/cloud/dataqna/v1alpha/question_service/paths.rb +88 -0
- data/lib/google/cloud/dataqna/v1alpha/question_service_pb.rb +49 -0
- data/lib/google/cloud/dataqna/v1alpha/question_service_services_pb.rb +68 -0
- data/lib/google/cloud/dataqna/v1alpha/user_feedback_pb.rb +32 -0
- data/lib/google/cloud/dataqna/v1alpha/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +65 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/dataqna/v1alpha/annotated_string.rb +110 -0
- data/proto_docs/google/cloud/dataqna/v1alpha/auto_suggestion_service.rb +140 -0
- data/proto_docs/google/cloud/dataqna/v1alpha/question.rb +418 -0
- data/proto_docs/google/cloud/dataqna/v1alpha/question_service.rb +91 -0
- data/proto_docs/google/cloud/dataqna/v1alpha/user_feedback.rb +55 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +219 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DataQnA
|
23
|
+
module V1alpha
|
24
|
+
# Describes string annotation from both semantic and formatting perspectives.
|
25
|
+
# Example:
|
26
|
+
#
|
27
|
+
# User Query:
|
28
|
+
#
|
29
|
+
# top countries by population in Africa
|
30
|
+
#
|
31
|
+
# 0 4 14 17 28 31 37
|
32
|
+
#
|
33
|
+
# Table Data:
|
34
|
+
#
|
35
|
+
# + "country" - dimension
|
36
|
+
# + "population" - metric
|
37
|
+
# + "Africa" - value in the "continent" column
|
38
|
+
#
|
39
|
+
# text_formatted = `"top countries by population in Africa"`
|
40
|
+
#
|
41
|
+
# html_formatted =
|
42
|
+
# `"top <b>countries</b> by <b>population</b> in <i>Africa</i>"`
|
43
|
+
#
|
44
|
+
# ```
|
45
|
+
# markups = [
|
46
|
+
# \\{DIMENSION, 4, 12}, // 'countries'
|
47
|
+
# \\{METRIC, 17, 26}, // 'population'
|
48
|
+
# \\{FILTER, 31, 36} // 'Africa'
|
49
|
+
# ]
|
50
|
+
# ```
|
51
|
+
#
|
52
|
+
# Note that html formattings for 'DIMENSION' and 'METRIC' are the same, while
|
53
|
+
# semantic markups are different.
|
54
|
+
# @!attribute [rw] text_formatted
|
55
|
+
# @return [::String]
|
56
|
+
# Text version of the string.
|
57
|
+
# @!attribute [rw] html_formatted
|
58
|
+
# @return [::String]
|
59
|
+
# HTML version of the string annotation.
|
60
|
+
# @!attribute [rw] markups
|
61
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>]
|
62
|
+
# Semantic version of the string annotation.
|
63
|
+
class AnnotatedString
|
64
|
+
include ::Google::Protobuf::MessageExts
|
65
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
66
|
+
|
67
|
+
# Semantic markup denotes a substring (by index and length) with markup
|
68
|
+
# information.
|
69
|
+
# @!attribute [rw] type
|
70
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkupType]
|
71
|
+
# The semantic type of the markup substring.
|
72
|
+
# @!attribute [rw] start_char_index
|
73
|
+
# @return [::Integer]
|
74
|
+
# Unicode character index of the query.
|
75
|
+
# @!attribute [rw] length
|
76
|
+
# @return [::Integer]
|
77
|
+
# The length (number of unicode characters) of the markup substring.
|
78
|
+
class SemanticMarkup
|
79
|
+
include ::Google::Protobuf::MessageExts
|
80
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
81
|
+
end
|
82
|
+
|
83
|
+
# Semantic markup types.
|
84
|
+
module SemanticMarkupType
|
85
|
+
# No markup type was specified.
|
86
|
+
MARKUP_TYPE_UNSPECIFIED = 0
|
87
|
+
|
88
|
+
# Markup for a substring denoting a metric.
|
89
|
+
METRIC = 1
|
90
|
+
|
91
|
+
# Markup for a substring denoting a dimension.
|
92
|
+
DIMENSION = 2
|
93
|
+
|
94
|
+
# Markup for a substring denoting a filter.
|
95
|
+
FILTER = 3
|
96
|
+
|
97
|
+
# Markup for an unused substring.
|
98
|
+
UNUSED = 4
|
99
|
+
|
100
|
+
# Markup for a substring containing blocked phrases.
|
101
|
+
BLOCKED = 5
|
102
|
+
|
103
|
+
# Markup for a substring that contains terms for row.
|
104
|
+
ROW = 6
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DataQnA
|
23
|
+
module V1alpha
|
24
|
+
# Request for query suggestions.
|
25
|
+
# @!attribute [rw] parent
|
26
|
+
# @return [::String]
|
27
|
+
# Required. The parent of the suggestion query is the resource denoting the project and
|
28
|
+
# location.
|
29
|
+
# @!attribute [rw] scopes
|
30
|
+
# @return [::Array<::String>]
|
31
|
+
# The scopes to which this search is restricted. The only supported scope
|
32
|
+
# pattern is
|
33
|
+
# `//bigquery.googleapis.com/projects/{GCP-PROJECT-ID}/datasets/{DATASET-ID}/tables/{TABLE-ID}`.
|
34
|
+
# @!attribute [rw] query
|
35
|
+
# @return [::String]
|
36
|
+
# User query for which to generate suggestions. If the query is empty, zero
|
37
|
+
# state suggestions are returned. This allows UIs to display suggestions
|
38
|
+
# right away, helping the user to get a sense of what a query might look
|
39
|
+
# like.
|
40
|
+
# @!attribute [rw] suggestion_types
|
41
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::SuggestionType>]
|
42
|
+
# The requested suggestion type. Multiple suggestion types can be
|
43
|
+
# requested, but there is no guarantee that the service will return
|
44
|
+
# suggestions for each type. Suggestions for a requested type might rank
|
45
|
+
# lower than suggestions for other types and the service may decide to cut
|
46
|
+
# these suggestions off.
|
47
|
+
class SuggestQueriesRequest
|
48
|
+
include ::Google::Protobuf::MessageExts
|
49
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
50
|
+
end
|
51
|
+
|
52
|
+
# A suggestion for a query with a ranking score.
|
53
|
+
# @!attribute [rw] suggestion_info
|
54
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::SuggestionInfo]
|
55
|
+
# Detailed information about the suggestion.
|
56
|
+
# @!attribute [rw] ranking_score
|
57
|
+
# @return [::Float]
|
58
|
+
# The score of the suggestion. This can be used to define ordering in UI.
|
59
|
+
# The score represents confidence in the suggestion where higher is better.
|
60
|
+
# All score values must be in the range [0, 1).
|
61
|
+
# @!attribute [rw] suggestion_type
|
62
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::SuggestionType]
|
63
|
+
# The type of the suggestion.
|
64
|
+
class Suggestion
|
65
|
+
include ::Google::Protobuf::MessageExts
|
66
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
67
|
+
end
|
68
|
+
|
69
|
+
# Detailed information about the suggestion.
|
70
|
+
# @!attribute [rw] annotated_suggestion
|
71
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::AnnotatedString]
|
72
|
+
# Annotations for the suggestion. This provides information about which part
|
73
|
+
# of the suggestion corresponds to what semantic meaning (e.g. a metric).
|
74
|
+
# @!attribute [rw] query_matches
|
75
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::SuggestionInfo::MatchInfo>]
|
76
|
+
# Matches between user query and the annotated string.
|
77
|
+
class SuggestionInfo
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
|
+
|
81
|
+
# MatchInfo describes which part of suggestion matched with data in user
|
82
|
+
# typed query. This can be used to highlight matching parts in the UI. This
|
83
|
+
# is different from the annotations provided in annotated_suggestion. The
|
84
|
+
# annotated_suggestion provides information about the semantic meaning, while
|
85
|
+
# this provides information about how it relates to the input.
|
86
|
+
#
|
87
|
+
# Example:
|
88
|
+
# user query: `top products`
|
89
|
+
#
|
90
|
+
# ```
|
91
|
+
# annotated_suggestion {
|
92
|
+
# text_formatted = "top product_group"
|
93
|
+
# html_formatted = "top <b>product_group</b>"
|
94
|
+
# markups {
|
95
|
+
# \\{type: TEXT, start_char_index: 0, length: 3}
|
96
|
+
# \\{type: DIMENSION, start_char_index: 4, length: 13}
|
97
|
+
# }
|
98
|
+
# }
|
99
|
+
#
|
100
|
+
# query_matches {
|
101
|
+
# { start_char_index: 0, length: 3 }
|
102
|
+
# { start_char_index: 4, length: 7}
|
103
|
+
# }
|
104
|
+
# ```
|
105
|
+
# @!attribute [rw] start_char_index
|
106
|
+
# @return [::Integer]
|
107
|
+
# Unicode character index of the string annotation.
|
108
|
+
# @!attribute [rw] length
|
109
|
+
# @return [::Integer]
|
110
|
+
# Count of unicode characters of this substring.
|
111
|
+
class MatchInfo
|
112
|
+
include ::Google::Protobuf::MessageExts
|
113
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# Response to SuggestQueries.
|
118
|
+
# @!attribute [rw] suggestions
|
119
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::Suggestion>]
|
120
|
+
# A list of suggestions.
|
121
|
+
class SuggestQueriesResponse
|
122
|
+
include ::Google::Protobuf::MessageExts
|
123
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
124
|
+
end
|
125
|
+
|
126
|
+
# The type of suggestion.
|
127
|
+
module SuggestionType
|
128
|
+
# No suggestiont type is specified.
|
129
|
+
SUGGESTION_TYPE_UNSPECIFIED = 0
|
130
|
+
|
131
|
+
# Entity suggestion type. Suggestions are for single entities.
|
132
|
+
ENTITY = 1
|
133
|
+
|
134
|
+
# Template suggestion type. Suggestions are for full sentences.
|
135
|
+
TEMPLATE = 2
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
@@ -0,0 +1,418 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DataQnA
|
23
|
+
module V1alpha
|
24
|
+
# The question resource represents a natural language query, its settings,
|
25
|
+
# understanding generated by the system, and answer retrieval status.
|
26
|
+
# A question cannot be modified.
|
27
|
+
# @!attribute [r] name
|
28
|
+
# @return [::String]
|
29
|
+
# Output only. Immutable. The unique identifier for the Question. The ID is server-generated.
|
30
|
+
# Example: `projects/foo/locations/bar/questions/123`
|
31
|
+
# @!attribute [rw] scopes
|
32
|
+
# @return [::Array<::String>]
|
33
|
+
# Required. Immutable. Scopes to be used for the question. A scope defines the relevant data set
|
34
|
+
# scope. It can be a reference to a specific data source or a collection of
|
35
|
+
# data sources. Currently, support is limited to a single BigQuery table.
|
36
|
+
# There must be exactly one `scopes` element.
|
37
|
+
#
|
38
|
+
# Example:
|
39
|
+
# `//bigquery.googleapis.com/projects/test-project/datasets/foo/tables/bar`
|
40
|
+
# @!attribute [rw] query
|
41
|
+
# @return [::String]
|
42
|
+
# Required. Immutable. The query in natural language.
|
43
|
+
# @!attribute [rw] data_source_annotations
|
44
|
+
# @return [::Array<::String>]
|
45
|
+
# A list of annotations to use instead of the default annotation of a data
|
46
|
+
# source (set in the data source reference resource). There must not be
|
47
|
+
# more than one annotation with the same data source reference.
|
48
|
+
# @!attribute [rw] interpret_error
|
49
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::InterpretError]
|
50
|
+
# An error field explaining why interpretation failed. This is only populated
|
51
|
+
# if the interpretation failed.
|
52
|
+
#
|
53
|
+
# Note: This is different from getting a status error on the request itself.
|
54
|
+
# This is not a client or server error and the Question resource is still
|
55
|
+
# persisted, but the service could not interpret the question. Clients should
|
56
|
+
# present the error to the user so the user can rephrase the question.
|
57
|
+
# @!attribute [rw] interpretations
|
58
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::Interpretation>]
|
59
|
+
# A list of interpretations for this question.
|
60
|
+
# @!attribute [rw] create_time
|
61
|
+
# @return [::Google::Protobuf::Timestamp]
|
62
|
+
# Time when the question was created.
|
63
|
+
# @!attribute [r] user_email
|
64
|
+
# @return [::String]
|
65
|
+
# Output only. The e-mail address of the user that created this question.
|
66
|
+
# @!attribute [rw] debug_flags
|
67
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::DebugFlags]
|
68
|
+
# Input only. Immutable. Flags to request additional information for debugging purposes.
|
69
|
+
# @!attribute [rw] debug_info
|
70
|
+
# @return [::Google::Protobuf::Any]
|
71
|
+
# Top level debug information.
|
72
|
+
# This will be stored as the type DebugInformation.
|
73
|
+
# Using Any so clients don't need to pull in anything
|
74
|
+
# inside the debug message.
|
75
|
+
class Question
|
76
|
+
include ::Google::Protobuf::MessageExts
|
77
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
78
|
+
end
|
79
|
+
|
80
|
+
# Details on the failure to interpret the question.
|
81
|
+
# @!attribute [rw] message
|
82
|
+
# @return [::String]
|
83
|
+
# Error message explaining why this question could not be interpreted.
|
84
|
+
# @!attribute [rw] code
|
85
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::InterpretError::InterpretErrorCode]
|
86
|
+
# The code for the error category why the interpretation failed.
|
87
|
+
# @!attribute [rw] details
|
88
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::InterpretError::InterpretErrorDetails]
|
89
|
+
# Details on interpretation failure.
|
90
|
+
class InterpretError
|
91
|
+
include ::Google::Protobuf::MessageExts
|
92
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
93
|
+
|
94
|
+
# Details on interpretation failure.
|
95
|
+
# @!attribute [rw] unsupported_details
|
96
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::InterpretError::InterpretUnsupportedDetails]
|
97
|
+
# Populated if parts of the query are unsupported.
|
98
|
+
# @!attribute [rw] incomplete_query_details
|
99
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::InterpretError::InterpretIncompleteQueryDetails]
|
100
|
+
# Populated if the query is incomplete.
|
101
|
+
# @!attribute [rw] ambiguity_details
|
102
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::InterpretError::InterpretAmbiguityDetails]
|
103
|
+
# Populated if the query was too ambiguous.
|
104
|
+
class InterpretErrorDetails
|
105
|
+
include ::Google::Protobuf::MessageExts
|
106
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
107
|
+
end
|
108
|
+
|
109
|
+
# Details about unsupported parts in a query.
|
110
|
+
# @!attribute [rw] operators
|
111
|
+
# @return [::Array<::String>]
|
112
|
+
# Unsupported operators. For example: median.
|
113
|
+
# @!attribute [rw] intent
|
114
|
+
# @return [::Array<::String>]
|
115
|
+
# Unsupported intents.
|
116
|
+
class InterpretUnsupportedDetails
|
117
|
+
include ::Google::Protobuf::MessageExts
|
118
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
119
|
+
end
|
120
|
+
|
121
|
+
# Details about an incomplete query.
|
122
|
+
# @!attribute [rw] entities
|
123
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::InterpretEntity>]
|
124
|
+
# List of missing interpret entities.
|
125
|
+
class InterpretIncompleteQueryDetails
|
126
|
+
include ::Google::Protobuf::MessageExts
|
127
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
128
|
+
end
|
129
|
+
|
130
|
+
# Details about a query that was too ambiguous. Currently, the message
|
131
|
+
# has no fields and its presence signals that there was ambiguity.
|
132
|
+
class InterpretAmbiguityDetails
|
133
|
+
include ::Google::Protobuf::MessageExts
|
134
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
135
|
+
end
|
136
|
+
|
137
|
+
# The interpret error code provides an error category why the interpretation
|
138
|
+
# failed.
|
139
|
+
module InterpretErrorCode
|
140
|
+
# No interpret error code was specified.
|
141
|
+
INTERPRET_ERROR_CODE_UNSPECIFIED = 0
|
142
|
+
|
143
|
+
# The query is not valid.
|
144
|
+
INVALID_QUERY = 1
|
145
|
+
|
146
|
+
# The interpreter failed to understand the question. For example, because
|
147
|
+
# it was too ambiguous.
|
148
|
+
FAILED_TO_UNDERSTAND = 2
|
149
|
+
|
150
|
+
# The interpreter could understand the question, but was not able to arrive
|
151
|
+
# at an answer. For example, because a requested operation is not
|
152
|
+
# supported.
|
153
|
+
FAILED_TO_ANSWER = 3
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Information about the backend status (such as BigQuery) of the execution.
|
158
|
+
# @!attribute [rw] job_creation_status
|
159
|
+
# @return [::Google::Rpc::Status]
|
160
|
+
# Status returned by the backend when the job was created.
|
161
|
+
# @!attribute [rw] job_execution_state
|
162
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::ExecutionInfo::JobExecutionState]
|
163
|
+
# Status of the job execution.
|
164
|
+
# @!attribute [rw] create_time
|
165
|
+
# @return [::Google::Protobuf::Timestamp]
|
166
|
+
# Time when the execution was triggered.
|
167
|
+
# @!attribute [rw] bigquery_job
|
168
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::BigQueryJob]
|
169
|
+
# BigQuery job information.
|
170
|
+
# Future versions will have different backends. Hence, clients must make sure
|
171
|
+
# they can handle it when this field is not populated.
|
172
|
+
class ExecutionInfo
|
173
|
+
include ::Google::Protobuf::MessageExts
|
174
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
175
|
+
|
176
|
+
# Enum of possible job execution statuses.
|
177
|
+
module JobExecutionState
|
178
|
+
# No job execution was specified.
|
179
|
+
JOB_EXECUTION_STATE_UNSPECIFIED = 0
|
180
|
+
|
181
|
+
# No job execution was requested, yet.
|
182
|
+
NOT_EXECUTED = 1
|
183
|
+
|
184
|
+
# The job is running.
|
185
|
+
RUNNING = 2
|
186
|
+
|
187
|
+
# The job completed successfully.
|
188
|
+
SUCCEEDED = 3
|
189
|
+
|
190
|
+
# The job completed unsuccessfully.
|
191
|
+
FAILED = 4
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# BigQuery job information. This can be used to query the BigQuery API and
|
196
|
+
# retrieve the current job's status (using
|
197
|
+
# [jobs.get](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get)).
|
198
|
+
# @!attribute [rw] job_id
|
199
|
+
# @return [::String]
|
200
|
+
# The job ID.
|
201
|
+
# @!attribute [rw] project_id
|
202
|
+
# @return [::String]
|
203
|
+
# The project ID of the job.
|
204
|
+
# @!attribute [rw] location
|
205
|
+
# @return [::String]
|
206
|
+
# The location where the job is running.
|
207
|
+
class BigQueryJob
|
208
|
+
include ::Google::Protobuf::MessageExts
|
209
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
210
|
+
end
|
211
|
+
|
212
|
+
# An interpretation of a natural language query.
|
213
|
+
# @!attribute [rw] data_sources
|
214
|
+
# @return [::Array<::String>]
|
215
|
+
# List of data sources used in the current understanding.
|
216
|
+
# @!attribute [rw] confidence
|
217
|
+
# @return [::Float]
|
218
|
+
# The level of confidence that one of the interpretations is correct. This is
|
219
|
+
# a value in the range [0, 1] where a value of 0.5 or below is to be
|
220
|
+
# considered a low confidence.
|
221
|
+
# @!attribute [rw] unused_phrases
|
222
|
+
# @return [::Array<::String>]
|
223
|
+
# A list of unused phrases. Clients should display a Did You Mean (DYM)
|
224
|
+
# dialog if this is non-empty, even if this is the only interpretation.
|
225
|
+
# @!attribute [rw] human_readable
|
226
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::HumanReadable]
|
227
|
+
# Human readable representation of the query.
|
228
|
+
# @!attribute [rw] interpretation_structure
|
229
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::InterpretationStructure]
|
230
|
+
# Information about the interpretation structure that helps to understand and
|
231
|
+
# visualize the response.
|
232
|
+
# @!attribute [rw] data_query
|
233
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::DataQuery]
|
234
|
+
# Representation of the data query to be sent to the backend.
|
235
|
+
# @!attribute [rw] execution_info
|
236
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::ExecutionInfo]
|
237
|
+
# Information about the backend response. This is populated only if execution
|
238
|
+
# of an interpretation was requested.
|
239
|
+
class Interpretation
|
240
|
+
include ::Google::Protobuf::MessageExts
|
241
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
242
|
+
end
|
243
|
+
|
244
|
+
# Representation of the data query for the backend.
|
245
|
+
# This is provided for informational purposes only. Clients should not use
|
246
|
+
# it to send it to the backend directly, but rather use the `execute` RPC
|
247
|
+
# to trigger the execution. Using the `execute` RPC is needed in order to
|
248
|
+
# track the state of a question and report on it correctly to the data
|
249
|
+
# administrators.
|
250
|
+
# @!attribute [rw] sql
|
251
|
+
# @return [::String]
|
252
|
+
# The generated SQL query to be sent to the backend.
|
253
|
+
class DataQuery
|
254
|
+
include ::Google::Protobuf::MessageExts
|
255
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
256
|
+
end
|
257
|
+
|
258
|
+
# Human readable interpretation.
|
259
|
+
# @!attribute [rw] generated_interpretation
|
260
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::AnnotatedString]
|
261
|
+
# Generated query explaining the interpretation.
|
262
|
+
# @!attribute [rw] original_question
|
263
|
+
# @return [::Google::Cloud::DataQnA::V1alpha::AnnotatedString]
|
264
|
+
# Annotations on the original query.
|
265
|
+
class HumanReadable
|
266
|
+
include ::Google::Protobuf::MessageExts
|
267
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
268
|
+
end
|
269
|
+
|
270
|
+
# Information about the interpretation structure that helps to understand and
|
271
|
+
# visualize the response.
|
272
|
+
# @!attribute [rw] visualization_types
|
273
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::InterpretationStructure::VisualizationType>]
|
274
|
+
# List of possible visualization types to apply for this interpretation. The
|
275
|
+
# order has no relevance.
|
276
|
+
# @!attribute [rw] column_info
|
277
|
+
# @return [::Array<::Google::Cloud::DataQnA::V1alpha::InterpretationStructure::ColumnInfo>]
|
278
|
+
# Information about the output columns, that is, the columns that will be
|
279
|
+
# returned by the backend.
|
280
|
+
class InterpretationStructure
|
281
|
+
include ::Google::Protobuf::MessageExts
|
282
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
283
|
+
|
284
|
+
# Information about a column.
|
285
|
+
# @!attribute [rw] output_alias
|
286
|
+
# @return [::String]
|
287
|
+
# The alias of the output column as used by the backend. For example, the
|
288
|
+
# field name in the schema provided in the query response in BigQuery.
|
289
|
+
# @!attribute [rw] display_name
|
290
|
+
# @return [::String]
|
291
|
+
# Human readable name of the output column.
|
292
|
+
class ColumnInfo
|
293
|
+
include ::Google::Protobuf::MessageExts
|
294
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
295
|
+
end
|
296
|
+
|
297
|
+
# Enumeration of visualzation types to use for query response data.
|
298
|
+
module VisualizationType
|
299
|
+
# No visualization type was specified.
|
300
|
+
VISUALIZATION_TYPE_UNSPECIFIED = 0
|
301
|
+
|
302
|
+
# Show a table.
|
303
|
+
TABLE = 1
|
304
|
+
|
305
|
+
# Show a [bar
|
306
|
+
# chart](https://developers.google.com/chart/interactive/docs/gallery/barchart).
|
307
|
+
BAR_CHART = 2
|
308
|
+
|
309
|
+
# Show a [column
|
310
|
+
# chart](https://developers.google.com/chart/interactive/docs/gallery/columnchart).
|
311
|
+
COLUMN_CHART = 3
|
312
|
+
|
313
|
+
# Show a
|
314
|
+
# [timeline](https://developers.google.com/chart/interactive/docs/gallery/timeline).
|
315
|
+
TIMELINE = 4
|
316
|
+
|
317
|
+
# Show a [scatter
|
318
|
+
# plot](https://developers.google.com/chart/interactive/docs/gallery/scatterchart).
|
319
|
+
SCATTER_PLOT = 5
|
320
|
+
|
321
|
+
# Show a [pie
|
322
|
+
# chart](https://developers.google.com/chart/interactive/docs/gallery/piechart).
|
323
|
+
PIE_CHART = 6
|
324
|
+
|
325
|
+
# Show a [line
|
326
|
+
# chart](https://developers.google.com/chart/interactive/docs/gallery/linechart).
|
327
|
+
LINE_CHART = 7
|
328
|
+
|
329
|
+
# Show an [area
|
330
|
+
# chart](https://developers.google.com/chart/interactive/docs/gallery/areachart).
|
331
|
+
AREA_CHART = 8
|
332
|
+
|
333
|
+
# Show a [combo
|
334
|
+
# chart](https://developers.google.com/chart/interactive/docs/gallery/combochart).
|
335
|
+
COMBO_CHART = 9
|
336
|
+
|
337
|
+
# Show a
|
338
|
+
# [histogram](https://developers.google.com/chart/interactive/docs/gallery/histogram).
|
339
|
+
HISTOGRAM = 10
|
340
|
+
|
341
|
+
# This denotes queries when the user has not specified the particular type
|
342
|
+
# of chart and has mentioned only a generic chart name such as "Chart",
|
343
|
+
# "Plot", "Graph", etc. This will differentiate it from specific charting
|
344
|
+
# terms such as "Bar chart", "Pie chart", etc.
|
345
|
+
GENERIC_CHART = 11
|
346
|
+
|
347
|
+
# The user tried to specify a chart type, but the interpreter could not
|
348
|
+
# understand the type. The client should display a generic chart and may
|
349
|
+
# give a hint to the user that the requested type was not understood.
|
350
|
+
CHART_NOT_UNDERSTOOD = 12
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
# Configuriation of debug flags.
|
355
|
+
# @!attribute [rw] include_va_query
|
356
|
+
# @return [::Boolean]
|
357
|
+
# Whether to include the original VAQuery.
|
358
|
+
# @!attribute [rw] include_nested_va_query
|
359
|
+
# @return [::Boolean]
|
360
|
+
# Whether to include the original nested VAQuery.
|
361
|
+
# @!attribute [rw] include_human_interpretation
|
362
|
+
# @return [::Boolean]
|
363
|
+
# Whether to include the original human interpretation strings generated
|
364
|
+
# by Analyza.
|
365
|
+
# @!attribute [rw] include_aqua_debug_response
|
366
|
+
# @return [::Boolean]
|
367
|
+
# Whether to include the Aqua debug response.
|
368
|
+
# @!attribute [rw] time_override
|
369
|
+
# @return [::Integer]
|
370
|
+
# The time in milliseconds from Unix epoch to be used
|
371
|
+
# to process the query. This is useful for testing
|
372
|
+
# the queries at different time period.
|
373
|
+
# If not set or time_override <= 0, then the current
|
374
|
+
# time is used.
|
375
|
+
# @!attribute [rw] is_internal_google_user
|
376
|
+
# @return [::Boolean]
|
377
|
+
# Set to true if request is initiated by an internal Google user.
|
378
|
+
# @!attribute [rw] ignore_cache
|
379
|
+
# @return [::Boolean]
|
380
|
+
# Determines whether cache needs to be ignored. If set to
|
381
|
+
# true, cache won't be queried and updated.
|
382
|
+
# @!attribute [rw] include_search_entities_rpc
|
383
|
+
# @return [::Boolean]
|
384
|
+
# Whether to include the request/response pair from the call to the
|
385
|
+
# EntityIndex for SearchEntities.
|
386
|
+
# @!attribute [rw] include_list_column_annotations_rpc
|
387
|
+
# @return [::Boolean]
|
388
|
+
# Whether to include the request/response pair from the call to the
|
389
|
+
# Annotations service for ListColumnAnnotations.
|
390
|
+
# @!attribute [rw] include_virtual_analyst_entities
|
391
|
+
# @return [::Boolean]
|
392
|
+
# Whether to include the entity list passed to Analyza.
|
393
|
+
# @!attribute [rw] include_table_list
|
394
|
+
# @return [::Boolean]
|
395
|
+
# Whether to include the table list.
|
396
|
+
# @!attribute [rw] include_domain_list
|
397
|
+
# @return [::Boolean]
|
398
|
+
# Whether to include the domain list.
|
399
|
+
class DebugFlags
|
400
|
+
include ::Google::Protobuf::MessageExts
|
401
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
402
|
+
end
|
403
|
+
|
404
|
+
# Query entities of an interpretation.
|
405
|
+
module InterpretEntity
|
406
|
+
# No interpret entity was specified.
|
407
|
+
INTERPRET_ENTITY_UNSPECIFIED = 0
|
408
|
+
|
409
|
+
# A dimenstion entity.
|
410
|
+
DIMENSION = 1
|
411
|
+
|
412
|
+
# A metric entity.
|
413
|
+
METRIC = 2
|
414
|
+
end
|
415
|
+
end
|
416
|
+
end
|
417
|
+
end
|
418
|
+
end
|