google-cloud-dataqna-v1alpha 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,51 @@
|
|
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
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module DataQnA
|
24
|
+
module V1alpha
|
25
|
+
module AutoSuggestionService
|
26
|
+
# Credentials for the AutoSuggestionService API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
30
|
+
]
|
31
|
+
self.env_vars = [
|
32
|
+
"BIGQUERY_DATAQNA_CREDENTIALS",
|
33
|
+
"BIGQUERY_DATAQNA_KEYFILE",
|
34
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
35
|
+
"GOOGLE_CLOUD_KEYFILE",
|
36
|
+
"GCLOUD_KEYFILE",
|
37
|
+
"BIGQUERY_DATAQNA_CREDENTIALS_JSON",
|
38
|
+
"BIGQUERY_DATAQNA_KEYFILE_JSON",
|
39
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
40
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
41
|
+
"GCLOUD_KEYFILE_JSON"
|
42
|
+
]
|
43
|
+
self.paths = [
|
44
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
45
|
+
]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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
|
+
module AutoSuggestionService
|
25
|
+
# Path helper methods for the AutoSuggestionService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Location resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
#
|
37
|
+
# @return [::String]
|
38
|
+
def location_path project:, location:
|
39
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
40
|
+
|
41
|
+
"projects/#{project}/locations/#{location}"
|
42
|
+
end
|
43
|
+
|
44
|
+
extend self
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/dataqna/v1alpha/auto_suggestion_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/api/resource_pb'
|
9
|
+
require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
|
10
|
+
require 'google/api/client_pb'
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("google/cloud/dataqna/v1alpha/auto_suggestion_service.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.cloud.dataqna.v1alpha.SuggestQueriesRequest" do
|
14
|
+
optional :parent, :string, 1
|
15
|
+
repeated :scopes, :string, 2
|
16
|
+
optional :query, :string, 3
|
17
|
+
repeated :suggestion_types, :enum, 4, "google.cloud.dataqna.v1alpha.SuggestionType"
|
18
|
+
end
|
19
|
+
add_message "google.cloud.dataqna.v1alpha.Suggestion" do
|
20
|
+
optional :suggestion_info, :message, 1, "google.cloud.dataqna.v1alpha.SuggestionInfo"
|
21
|
+
optional :ranking_score, :double, 2
|
22
|
+
optional :suggestion_type, :enum, 3, "google.cloud.dataqna.v1alpha.SuggestionType"
|
23
|
+
end
|
24
|
+
add_message "google.cloud.dataqna.v1alpha.SuggestionInfo" do
|
25
|
+
optional :annotated_suggestion, :message, 1, "google.cloud.dataqna.v1alpha.AnnotatedString"
|
26
|
+
repeated :query_matches, :message, 2, "google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo"
|
27
|
+
end
|
28
|
+
add_message "google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo" do
|
29
|
+
optional :start_char_index, :int32, 1
|
30
|
+
optional :length, :int32, 2
|
31
|
+
end
|
32
|
+
add_message "google.cloud.dataqna.v1alpha.SuggestQueriesResponse" do
|
33
|
+
repeated :suggestions, :message, 1, "google.cloud.dataqna.v1alpha.Suggestion"
|
34
|
+
end
|
35
|
+
add_enum "google.cloud.dataqna.v1alpha.SuggestionType" do
|
36
|
+
value :SUGGESTION_TYPE_UNSPECIFIED, 0
|
37
|
+
value :ENTITY, 1
|
38
|
+
value :TEMPLATE, 2
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module Google
|
44
|
+
module Cloud
|
45
|
+
module DataQnA
|
46
|
+
module V1alpha
|
47
|
+
SuggestQueriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.SuggestQueriesRequest").msgclass
|
48
|
+
Suggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.Suggestion").msgclass
|
49
|
+
SuggestionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.SuggestionInfo").msgclass
|
50
|
+
SuggestionInfo::MatchInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo").msgclass
|
51
|
+
SuggestQueriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.SuggestQueriesResponse").msgclass
|
52
|
+
SuggestionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.SuggestionType").enummodule
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/dataqna/v1alpha/auto_suggestion_service.proto for package 'Google.Cloud.DataQnA.V1alpha'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/dataqna/v1alpha/auto_suggestion_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DataQnA
|
25
|
+
module V1alpha
|
26
|
+
module AutoSuggestionService
|
27
|
+
# This stateless API provides automatic suggestions for natural language
|
28
|
+
# queries for the data sources in the provided project and location.
|
29
|
+
#
|
30
|
+
# The service provides a resourceless operation `suggestQueries` that can be
|
31
|
+
# called to get a list of suggestions for a given incomplete query and scope
|
32
|
+
# (or list of scopes) under which the query is to be interpreted.
|
33
|
+
#
|
34
|
+
# There are two types of suggestions, ENTITY for single entity suggestions
|
35
|
+
# and TEMPLATE for full sentences. By default, both types are returned.
|
36
|
+
#
|
37
|
+
# Example Request:
|
38
|
+
# ```
|
39
|
+
# GetSuggestions({
|
40
|
+
# parent: "locations/us/projects/my-project"
|
41
|
+
# scopes:
|
42
|
+
# "//bigquery.googleapis.com/projects/my-project/datasets/my-dataset/tables/my-table"
|
43
|
+
# query: "top it"
|
44
|
+
# })
|
45
|
+
# ```
|
46
|
+
#
|
47
|
+
# The service will retrieve information based on the given scope(s) and give
|
48
|
+
# suggestions based on that (e.g. "top item" for "top it" if "item" is a known
|
49
|
+
# dimension for the provided scope).
|
50
|
+
# ```
|
51
|
+
# suggestions {
|
52
|
+
# suggestion_info {
|
53
|
+
# annotated_suggestion {
|
54
|
+
# text_formatted: "top item by sum of usd_revenue_net"
|
55
|
+
# markups {
|
56
|
+
# type: DIMENSION
|
57
|
+
# start_char_index: 4
|
58
|
+
# length: 4
|
59
|
+
# }
|
60
|
+
# markups {
|
61
|
+
# type: METRIC
|
62
|
+
# start_char_index: 19
|
63
|
+
# length: 15
|
64
|
+
# }
|
65
|
+
# }
|
66
|
+
# query_matches {
|
67
|
+
# start_char_index: 0
|
68
|
+
# length: 6
|
69
|
+
# }
|
70
|
+
# }
|
71
|
+
# suggestion_type: TEMPLATE
|
72
|
+
# ranking_score: 0.9
|
73
|
+
# }
|
74
|
+
# suggestions {
|
75
|
+
# suggestion_info {
|
76
|
+
# annotated_suggestion {
|
77
|
+
# text_formatted: "item"
|
78
|
+
# markups {
|
79
|
+
# type: DIMENSION
|
80
|
+
# start_char_index: 4
|
81
|
+
# length: 2
|
82
|
+
# }
|
83
|
+
# }
|
84
|
+
# query_matches {
|
85
|
+
# start_char_index: 0
|
86
|
+
# length: 6
|
87
|
+
# }
|
88
|
+
# }
|
89
|
+
# suggestion_type: ENTITY
|
90
|
+
# ranking_score: 0.8
|
91
|
+
# }
|
92
|
+
# ```
|
93
|
+
class Service
|
94
|
+
|
95
|
+
include GRPC::GenericService
|
96
|
+
|
97
|
+
self.marshal_class_method = :encode
|
98
|
+
self.unmarshal_class_method = :decode
|
99
|
+
self.service_name = 'google.cloud.dataqna.v1alpha.AutoSuggestionService'
|
100
|
+
|
101
|
+
# Gets a list of suggestions based on a prefix string.
|
102
|
+
# AutoSuggestion tolerance should be less than 1 second.
|
103
|
+
rpc :SuggestQueries, ::Google::Cloud::DataQnA::V1alpha::SuggestQueriesRequest, ::Google::Cloud::DataQnA::V1alpha::SuggestQueriesResponse
|
104
|
+
end
|
105
|
+
|
106
|
+
Stub = Service.rpc_stub_class
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/dataqna/v1alpha/question.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
|
9
|
+
require 'google/protobuf/any_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/rpc/status_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("google/cloud/dataqna/v1alpha/question.proto", :syntax => :proto3) do
|
14
|
+
add_message "google.cloud.dataqna.v1alpha.Question" do
|
15
|
+
optional :name, :string, 1
|
16
|
+
repeated :scopes, :string, 2
|
17
|
+
optional :query, :string, 3
|
18
|
+
repeated :data_source_annotations, :string, 4
|
19
|
+
optional :interpret_error, :message, 5, "google.cloud.dataqna.v1alpha.InterpretError"
|
20
|
+
repeated :interpretations, :message, 6, "google.cloud.dataqna.v1alpha.Interpretation"
|
21
|
+
optional :create_time, :message, 7, "google.protobuf.Timestamp"
|
22
|
+
optional :user_email, :string, 8
|
23
|
+
optional :debug_flags, :message, 9, "google.cloud.dataqna.v1alpha.DebugFlags"
|
24
|
+
optional :debug_info, :message, 10, "google.protobuf.Any"
|
25
|
+
end
|
26
|
+
add_message "google.cloud.dataqna.v1alpha.InterpretError" do
|
27
|
+
optional :message, :string, 1
|
28
|
+
optional :code, :enum, 2, "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode"
|
29
|
+
optional :details, :message, 3, "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails"
|
30
|
+
end
|
31
|
+
add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails" do
|
32
|
+
optional :unsupported_details, :message, 1, "google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails"
|
33
|
+
optional :incomplete_query_details, :message, 2, "google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails"
|
34
|
+
optional :ambiguity_details, :message, 3, "google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails"
|
35
|
+
end
|
36
|
+
add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails" do
|
37
|
+
repeated :operators, :string, 1
|
38
|
+
repeated :intent, :string, 2
|
39
|
+
end
|
40
|
+
add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails" do
|
41
|
+
repeated :entities, :enum, 1, "google.cloud.dataqna.v1alpha.InterpretEntity"
|
42
|
+
end
|
43
|
+
add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails" do
|
44
|
+
end
|
45
|
+
add_enum "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode" do
|
46
|
+
value :INTERPRET_ERROR_CODE_UNSPECIFIED, 0
|
47
|
+
value :INVALID_QUERY, 1
|
48
|
+
value :FAILED_TO_UNDERSTAND, 2
|
49
|
+
value :FAILED_TO_ANSWER, 3
|
50
|
+
end
|
51
|
+
add_message "google.cloud.dataqna.v1alpha.ExecutionInfo" do
|
52
|
+
optional :job_creation_status, :message, 1, "google.rpc.Status"
|
53
|
+
optional :job_execution_state, :enum, 2, "google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState"
|
54
|
+
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
55
|
+
optional :bigquery_job, :message, 4, "google.cloud.dataqna.v1alpha.BigQueryJob"
|
56
|
+
end
|
57
|
+
add_enum "google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState" do
|
58
|
+
value :JOB_EXECUTION_STATE_UNSPECIFIED, 0
|
59
|
+
value :NOT_EXECUTED, 1
|
60
|
+
value :RUNNING, 2
|
61
|
+
value :SUCCEEDED, 3
|
62
|
+
value :FAILED, 4
|
63
|
+
end
|
64
|
+
add_message "google.cloud.dataqna.v1alpha.BigQueryJob" do
|
65
|
+
optional :job_id, :string, 1
|
66
|
+
optional :project_id, :string, 2
|
67
|
+
optional :location, :string, 3
|
68
|
+
end
|
69
|
+
add_message "google.cloud.dataqna.v1alpha.Interpretation" do
|
70
|
+
repeated :data_sources, :string, 1
|
71
|
+
optional :confidence, :double, 2
|
72
|
+
repeated :unused_phrases, :string, 3
|
73
|
+
optional :human_readable, :message, 4, "google.cloud.dataqna.v1alpha.HumanReadable"
|
74
|
+
optional :interpretation_structure, :message, 5, "google.cloud.dataqna.v1alpha.InterpretationStructure"
|
75
|
+
optional :data_query, :message, 6, "google.cloud.dataqna.v1alpha.DataQuery"
|
76
|
+
optional :execution_info, :message, 7, "google.cloud.dataqna.v1alpha.ExecutionInfo"
|
77
|
+
end
|
78
|
+
add_message "google.cloud.dataqna.v1alpha.DataQuery" do
|
79
|
+
optional :sql, :string, 1
|
80
|
+
end
|
81
|
+
add_message "google.cloud.dataqna.v1alpha.HumanReadable" do
|
82
|
+
optional :generated_interpretation, :message, 1, "google.cloud.dataqna.v1alpha.AnnotatedString"
|
83
|
+
optional :original_question, :message, 2, "google.cloud.dataqna.v1alpha.AnnotatedString"
|
84
|
+
end
|
85
|
+
add_message "google.cloud.dataqna.v1alpha.InterpretationStructure" do
|
86
|
+
repeated :visualization_types, :enum, 1, "google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType"
|
87
|
+
repeated :column_info, :message, 2, "google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo"
|
88
|
+
end
|
89
|
+
add_message "google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo" do
|
90
|
+
optional :output_alias, :string, 1
|
91
|
+
optional :display_name, :string, 2
|
92
|
+
end
|
93
|
+
add_enum "google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType" do
|
94
|
+
value :VISUALIZATION_TYPE_UNSPECIFIED, 0
|
95
|
+
value :TABLE, 1
|
96
|
+
value :BAR_CHART, 2
|
97
|
+
value :COLUMN_CHART, 3
|
98
|
+
value :TIMELINE, 4
|
99
|
+
value :SCATTER_PLOT, 5
|
100
|
+
value :PIE_CHART, 6
|
101
|
+
value :LINE_CHART, 7
|
102
|
+
value :AREA_CHART, 8
|
103
|
+
value :COMBO_CHART, 9
|
104
|
+
value :HISTOGRAM, 10
|
105
|
+
value :GENERIC_CHART, 11
|
106
|
+
value :CHART_NOT_UNDERSTOOD, 12
|
107
|
+
end
|
108
|
+
add_message "google.cloud.dataqna.v1alpha.DebugFlags" do
|
109
|
+
optional :include_va_query, :bool, 1
|
110
|
+
optional :include_nested_va_query, :bool, 2
|
111
|
+
optional :include_human_interpretation, :bool, 3
|
112
|
+
optional :include_aqua_debug_response, :bool, 4
|
113
|
+
optional :time_override, :int64, 5
|
114
|
+
optional :is_internal_google_user, :bool, 6
|
115
|
+
optional :ignore_cache, :bool, 7
|
116
|
+
optional :include_search_entities_rpc, :bool, 8
|
117
|
+
optional :include_list_column_annotations_rpc, :bool, 9
|
118
|
+
optional :include_virtual_analyst_entities, :bool, 10
|
119
|
+
optional :include_table_list, :bool, 11
|
120
|
+
optional :include_domain_list, :bool, 12
|
121
|
+
end
|
122
|
+
add_enum "google.cloud.dataqna.v1alpha.InterpretEntity" do
|
123
|
+
value :INTERPRET_ENTITY_UNSPECIFIED, 0
|
124
|
+
value :DIMENSION, 1
|
125
|
+
value :METRIC, 2
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
module Google
|
131
|
+
module Cloud
|
132
|
+
module DataQnA
|
133
|
+
module V1alpha
|
134
|
+
Question = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.Question").msgclass
|
135
|
+
InterpretError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretError").msgclass
|
136
|
+
InterpretError::InterpretErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails").msgclass
|
137
|
+
InterpretError::InterpretUnsupportedDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails").msgclass
|
138
|
+
InterpretError::InterpretIncompleteQueryDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails").msgclass
|
139
|
+
InterpretError::InterpretAmbiguityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails").msgclass
|
140
|
+
InterpretError::InterpretErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode").enummodule
|
141
|
+
ExecutionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.ExecutionInfo").msgclass
|
142
|
+
ExecutionInfo::JobExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState").enummodule
|
143
|
+
BigQueryJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.BigQueryJob").msgclass
|
144
|
+
Interpretation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.Interpretation").msgclass
|
145
|
+
DataQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.DataQuery").msgclass
|
146
|
+
HumanReadable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.HumanReadable").msgclass
|
147
|
+
InterpretationStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretationStructure").msgclass
|
148
|
+
InterpretationStructure::ColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo").msgclass
|
149
|
+
InterpretationStructure::VisualizationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType").enummodule
|
150
|
+
DebugFlags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.DebugFlags").msgclass
|
151
|
+
InterpretEntity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataqna.v1alpha.InterpretEntity").enummodule
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,63 @@
|
|
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
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/dataqna/v1alpha/version"
|
24
|
+
|
25
|
+
require "google/cloud/dataqna/v1alpha/question_service/credentials"
|
26
|
+
require "google/cloud/dataqna/v1alpha/question_service/paths"
|
27
|
+
require "google/cloud/dataqna/v1alpha/question_service/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module DataQnA
|
32
|
+
module V1alpha
|
33
|
+
##
|
34
|
+
# Service to interpret natural language queries.
|
35
|
+
# The service allows to create `Question` resources that are interpreted and
|
36
|
+
# are filled with one or more interpretations if the question could be
|
37
|
+
# interpreted. Once a `Question` resource is created and has at least one
|
38
|
+
# interpretation, an interpretation can be chosen for execution, which
|
39
|
+
# triggers a query to the backend (for BigQuery, it will create a job).
|
40
|
+
# Upon successful execution of that interpretation, backend specific
|
41
|
+
# information will be returned so that the client can retrieve the results
|
42
|
+
# from the backend.
|
43
|
+
#
|
44
|
+
# The `Question` resources are named `projects/*/locations/*/questions/*`.
|
45
|
+
#
|
46
|
+
# The `Question` resource has a singletion sub-resource `UserFeedback` named
|
47
|
+
# `projects/*/locations/*/questions/*/userFeedback`, which allows access to
|
48
|
+
# user feedback.
|
49
|
+
#
|
50
|
+
# To load this service and instantiate a client:
|
51
|
+
#
|
52
|
+
# require "google/cloud/dataqna/v1alpha/question_service"
|
53
|
+
# client = ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
54
|
+
#
|
55
|
+
module QuestionService
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
helper_path = ::File.join __dir__, "question_service", "helpers.rb"
|
63
|
+
require "google/cloud/dataqna/v1alpha/question_service/helpers" if ::File.file? helper_path
|