google-cloud-dataqna-v1alpha 0.3.0 → 0.5.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 +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/cloud/dataqna/v1alpha/annotated_string_pb.rb +24 -20
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/client.rb +16 -5
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service_pb.rb +25 -28
- data/lib/google/cloud/dataqna/v1alpha/question_pb.rb +28 -114
- data/lib/google/cloud/dataqna/v1alpha/question_service/client.rb +16 -5
- data/lib/google/cloud/dataqna/v1alpha/question_service.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha/question_service_pb.rb +27 -20
- data/lib/google/cloud/dataqna/v1alpha/user_feedback_pb.rb +24 -11
- data/lib/google/cloud/dataqna/v1alpha/version.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha.rb +2 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +11 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9235535560dda36453667799794fdaf9614088133d9bfe97748985a4dd6df11e
|
4
|
+
data.tar.gz: 7c3392a760bfec77a3fbcf41aaf3e2281fee172b3640291daaff91f32b4aceb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5878356dea8626c71f610aa49a2e41a8cd8968b6df7fc2eb6f93f410990c3e0daae29d265a57e1ddcd1fb522aab6257ba36d522b2d458bc6d00d46fb2b8732f
|
7
|
+
data.tar.gz: 9107ac0fdc2b7256c02298f247b6b22d37f008f582e2bb433afd6a70896d4d7d81330ef68408c346c2b7bed973f0193b1b7ed86a729199b37e9d3510914bc19c
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the BigQuery Data QnA V1alpha API
|
2
2
|
|
3
|
-
|
3
|
+
Data QnA is a natural language question and answer service for BigQuery data.
|
4
4
|
|
5
5
|
Data QnA is a natural language question and answer service for BigQuery data.
|
6
6
|
|
@@ -43,8 +43,8 @@ for class and method documentation.
|
|
43
43
|
## Enabling Logging
|
44
44
|
|
45
45
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
46
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
47
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
46
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
47
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
48
48
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
49
49
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
50
50
|
|
@@ -1,30 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/dataqna/v1alpha/annotated_string.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n3google/cloud/dataqna/v1alpha/annotated_string.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\"\x99\x03\n\x0f\x41nnotatedString\x12\x16\n\x0etext_formatted\x18\x01 \x01(\t\x12\x16\n\x0ehtml_formatted\x18\x02 \x01(\t\x12M\n\x07markups\x18\x03 \x03(\x0b\x32<.google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkup\x1a\x8a\x01\n\x0eSemanticMarkup\x12N\n\x04type\x18\x01 \x01(\x0e\x32@.google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkupType\x12\x18\n\x10start_char_index\x18\x02 \x01(\x05\x12\x0e\n\x06length\x18\x03 \x01(\x05\"z\n\x12SemanticMarkupType\x12\x1b\n\x17MARKUP_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06METRIC\x10\x01\x12\r\n\tDIMENSION\x10\x02\x12\n\n\x06\x46ILTER\x10\x03\x12\n\n\x06UNUSED\x10\x04\x12\x0b\n\x07\x42LOCKED\x10\x05\x12\x07\n\x03ROW\x10\x06\x42\xd6\x01\n com.google.cloud.dataqna.v1alphaB\x14\x41nnotatedStringProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
26
28
|
end
|
27
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
28
32
|
end
|
29
33
|
|
30
34
|
module Google
|
@@ -190,7 +190,7 @@ module Google
|
|
190
190
|
credentials = @config.credentials
|
191
191
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
192
192
|
# but only if the default endpoint does not have a region prefix.
|
193
|
-
enable_self_signed_jwt = @config.endpoint ==
|
193
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
194
194
|
!@config.endpoint.split(".").first.include?("-")
|
195
195
|
credentials ||= Credentials.default scope: @config.scope,
|
196
196
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -205,7 +205,8 @@ module Google
|
|
205
205
|
credentials: credentials,
|
206
206
|
endpoint: @config.endpoint,
|
207
207
|
channel_args: @config.channel_args,
|
208
|
-
interceptors: @config.interceptors
|
208
|
+
interceptors: @config.interceptors,
|
209
|
+
channel_pool_config: @config.channel_pool
|
209
210
|
)
|
210
211
|
end
|
211
212
|
|
@@ -351,9 +352,9 @@ module Google
|
|
351
352
|
# * (`String`) The path to a service account key file in JSON format
|
352
353
|
# * (`Hash`) A service account key as a Hash
|
353
354
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
354
|
-
# (see the [googleauth docs](https://
|
355
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
355
356
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
356
|
-
# (see the [signet docs](https://
|
357
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
357
358
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
358
359
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
359
360
|
# * (`nil`) indicating no credentials
|
@@ -395,7 +396,9 @@ module Google
|
|
395
396
|
class Configuration
|
396
397
|
extend ::Gapic::Config
|
397
398
|
|
398
|
-
|
399
|
+
DEFAULT_ENDPOINT = "dataqna.googleapis.com"
|
400
|
+
|
401
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
399
402
|
config_attr :credentials, nil do |value|
|
400
403
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
401
404
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -430,6 +433,14 @@ module Google
|
|
430
433
|
end
|
431
434
|
end
|
432
435
|
|
436
|
+
##
|
437
|
+
# Configuration for the channel pool
|
438
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
439
|
+
#
|
440
|
+
def channel_pool
|
441
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
442
|
+
end
|
443
|
+
|
433
444
|
##
|
434
445
|
# Configuration RPC class for the AutoSuggestionService API.
|
435
446
|
#
|
@@ -98,7 +98,7 @@ module Google
|
|
98
98
|
# }
|
99
99
|
# ```
|
100
100
|
#
|
101
|
-
#
|
101
|
+
# @example Load this service and instantiate a gRPC client
|
102
102
|
#
|
103
103
|
# require "google/cloud/dataqna/v1alpha/auto_suggestion_service"
|
104
104
|
# client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/dataqna/v1alpha/auto_suggestion_service.proto
|
3
4
|
|
@@ -9,36 +10,32 @@ require 'google/api/resource_pb'
|
|
9
10
|
require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
|
10
11
|
require 'google/api/client_pb'
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
repeated :suggestions, :message, 1, "google.cloud.dataqna.v1alpha.Suggestion"
|
35
|
-
end
|
36
|
-
add_enum "google.cloud.dataqna.v1alpha.SuggestionType" do
|
37
|
-
value :SUGGESTION_TYPE_UNSPECIFIED, 0
|
38
|
-
value :ENTITY, 1
|
39
|
-
value :TEMPLATE, 2
|
13
|
+
|
14
|
+
descriptor_data = "\n:google/cloud/dataqna/v1alpha/auto_suggestion_service.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dataqna/v1alpha/annotated_string.proto\x1a\x17google/api/client.proto\"\xb9\x01\n\x15SuggestQueriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06scopes\x18\x02 \x03(\t\x12\r\n\x05query\x18\x03 \x01(\t\x12\x46\n\x10suggestion_types\x18\x04 \x03(\x0e\x32,.google.cloud.dataqna.v1alpha.SuggestionType\"\xb1\x01\n\nSuggestion\x12\x45\n\x0fsuggestion_info\x18\x01 \x01(\x0b\x32,.google.cloud.dataqna.v1alpha.SuggestionInfo\x12\x15\n\rranking_score\x18\x02 \x01(\x01\x12\x45\n\x0fsuggestion_type\x18\x03 \x01(\x0e\x32,.google.cloud.dataqna.v1alpha.SuggestionType\"\xe3\x01\n\x0eSuggestionInfo\x12K\n\x14\x61nnotated_suggestion\x18\x01 \x01(\x0b\x32-.google.cloud.dataqna.v1alpha.AnnotatedString\x12M\n\rquery_matches\x18\x02 \x03(\x0b\x32\x36.google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo\x1a\x35\n\tMatchInfo\x12\x18\n\x10start_char_index\x18\x01 \x01(\x05\x12\x0e\n\x06length\x18\x02 \x01(\x05\"W\n\x16SuggestQueriesResponse\x12=\n\x0bsuggestions\x18\x01 \x03(\x0b\x32(.google.cloud.dataqna.v1alpha.Suggestion*K\n\x0eSuggestionType\x12\x1f\n\x1bSUGGESTION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NTITY\x10\x01\x12\x0c\n\x08TEMPLATE\x10\x02\x32\xa5\x02\n\x15\x41utoSuggestionService\x12\xbf\x01\n\x0eSuggestQueries\x12\x33.google.cloud.dataqna.v1alpha.SuggestQueriesRequest\x1a\x34.google.cloud.dataqna.v1alpha.SuggestQueriesResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1alpha/{parent=projects/*/locations/*}:suggestQueries:\x01*\x1aJ\xca\x41\x16\x64\x61taqna.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdc\x01\n com.google.cloud.dataqna.v1alphaB\x1a\x41utoSuggestionServiceProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
|
15
|
+
|
16
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
|
+
|
18
|
+
begin
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
20
|
+
rescue TypeError => e
|
21
|
+
# Compatibility code: will be removed in the next major version.
|
22
|
+
require 'google/protobuf/descriptor_pb'
|
23
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
24
|
+
parsed.clear_dependency
|
25
|
+
serialized = parsed.class.encode(parsed)
|
26
|
+
file = pool.add_serialized_file(serialized)
|
27
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
28
|
+
imports = [
|
29
|
+
["google.cloud.dataqna.v1alpha.AnnotatedString", "google/cloud/dataqna/v1alpha/annotated_string.proto"],
|
30
|
+
]
|
31
|
+
imports.each do |type_name, expected_filename|
|
32
|
+
import_file = pool.lookup(type_name).file_descriptor
|
33
|
+
if import_file.name != expected_filename
|
34
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
40
35
|
end
|
41
36
|
end
|
37
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
38
|
+
warn "This will become an error in the next major version."
|
42
39
|
end
|
43
40
|
|
44
41
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/dataqna/v1alpha/question.proto
|
3
4
|
|
@@ -10,122 +11,35 @@ require 'google/protobuf/any_pb'
|
|
10
11
|
require 'google/protobuf/timestamp_pb'
|
11
12
|
require 'google/rpc/status_pb'
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
repeated :operators, :string, 1
|
39
|
-
repeated :intent, :string, 2
|
40
|
-
end
|
41
|
-
add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails" do
|
42
|
-
repeated :entities, :enum, 1, "google.cloud.dataqna.v1alpha.InterpretEntity"
|
43
|
-
end
|
44
|
-
add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails" do
|
45
|
-
end
|
46
|
-
add_enum "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode" do
|
47
|
-
value :INTERPRET_ERROR_CODE_UNSPECIFIED, 0
|
48
|
-
value :INVALID_QUERY, 1
|
49
|
-
value :FAILED_TO_UNDERSTAND, 2
|
50
|
-
value :FAILED_TO_ANSWER, 3
|
51
|
-
end
|
52
|
-
add_message "google.cloud.dataqna.v1alpha.ExecutionInfo" do
|
53
|
-
optional :job_creation_status, :message, 1, "google.rpc.Status"
|
54
|
-
optional :job_execution_state, :enum, 2, "google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState"
|
55
|
-
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
56
|
-
optional :bigquery_job, :message, 4, "google.cloud.dataqna.v1alpha.BigQueryJob"
|
57
|
-
end
|
58
|
-
add_enum "google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState" do
|
59
|
-
value :JOB_EXECUTION_STATE_UNSPECIFIED, 0
|
60
|
-
value :NOT_EXECUTED, 1
|
61
|
-
value :RUNNING, 2
|
62
|
-
value :SUCCEEDED, 3
|
63
|
-
value :FAILED, 4
|
64
|
-
end
|
65
|
-
add_message "google.cloud.dataqna.v1alpha.BigQueryJob" do
|
66
|
-
optional :job_id, :string, 1
|
67
|
-
optional :project_id, :string, 2
|
68
|
-
optional :location, :string, 3
|
69
|
-
end
|
70
|
-
add_message "google.cloud.dataqna.v1alpha.Interpretation" do
|
71
|
-
repeated :data_sources, :string, 1
|
72
|
-
optional :confidence, :double, 2
|
73
|
-
repeated :unused_phrases, :string, 3
|
74
|
-
optional :human_readable, :message, 4, "google.cloud.dataqna.v1alpha.HumanReadable"
|
75
|
-
optional :interpretation_structure, :message, 5, "google.cloud.dataqna.v1alpha.InterpretationStructure"
|
76
|
-
optional :data_query, :message, 6, "google.cloud.dataqna.v1alpha.DataQuery"
|
77
|
-
optional :execution_info, :message, 7, "google.cloud.dataqna.v1alpha.ExecutionInfo"
|
78
|
-
end
|
79
|
-
add_message "google.cloud.dataqna.v1alpha.DataQuery" do
|
80
|
-
optional :sql, :string, 1
|
81
|
-
end
|
82
|
-
add_message "google.cloud.dataqna.v1alpha.HumanReadable" do
|
83
|
-
optional :generated_interpretation, :message, 1, "google.cloud.dataqna.v1alpha.AnnotatedString"
|
84
|
-
optional :original_question, :message, 2, "google.cloud.dataqna.v1alpha.AnnotatedString"
|
85
|
-
end
|
86
|
-
add_message "google.cloud.dataqna.v1alpha.InterpretationStructure" do
|
87
|
-
repeated :visualization_types, :enum, 1, "google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType"
|
88
|
-
repeated :column_info, :message, 2, "google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo"
|
89
|
-
end
|
90
|
-
add_message "google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo" do
|
91
|
-
optional :output_alias, :string, 1
|
92
|
-
optional :display_name, :string, 2
|
93
|
-
end
|
94
|
-
add_enum "google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType" do
|
95
|
-
value :VISUALIZATION_TYPE_UNSPECIFIED, 0
|
96
|
-
value :TABLE, 1
|
97
|
-
value :BAR_CHART, 2
|
98
|
-
value :COLUMN_CHART, 3
|
99
|
-
value :TIMELINE, 4
|
100
|
-
value :SCATTER_PLOT, 5
|
101
|
-
value :PIE_CHART, 6
|
102
|
-
value :LINE_CHART, 7
|
103
|
-
value :AREA_CHART, 8
|
104
|
-
value :COMBO_CHART, 9
|
105
|
-
value :HISTOGRAM, 10
|
106
|
-
value :GENERIC_CHART, 11
|
107
|
-
value :CHART_NOT_UNDERSTOOD, 12
|
108
|
-
end
|
109
|
-
add_message "google.cloud.dataqna.v1alpha.DebugFlags" do
|
110
|
-
optional :include_va_query, :bool, 1
|
111
|
-
optional :include_nested_va_query, :bool, 2
|
112
|
-
optional :include_human_interpretation, :bool, 3
|
113
|
-
optional :include_aqua_debug_response, :bool, 4
|
114
|
-
optional :time_override, :int64, 5
|
115
|
-
optional :is_internal_google_user, :bool, 6
|
116
|
-
optional :ignore_cache, :bool, 7
|
117
|
-
optional :include_search_entities_rpc, :bool, 8
|
118
|
-
optional :include_list_column_annotations_rpc, :bool, 9
|
119
|
-
optional :include_virtual_analyst_entities, :bool, 10
|
120
|
-
optional :include_table_list, :bool, 11
|
121
|
-
optional :include_domain_list, :bool, 12
|
122
|
-
end
|
123
|
-
add_enum "google.cloud.dataqna.v1alpha.InterpretEntity" do
|
124
|
-
value :INTERPRET_ENTITY_UNSPECIFIED, 0
|
125
|
-
value :DIMENSION, 1
|
126
|
-
value :METRIC, 2
|
14
|
+
|
15
|
+
descriptor_data = "\n+google/cloud/dataqna/v1alpha/question.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dataqna/v1alpha/annotated_string.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9d\x04\n\x08Question\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x16\n\x06scopes\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05query\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1f\n\x17\x64\x61ta_source_annotations\x18\x04 \x03(\t\x12\x45\n\x0finterpret_error\x18\x05 \x01(\x0b\x32,.google.cloud.dataqna.v1alpha.InterpretError\x12\x45\n\x0finterpretations\x18\x06 \x03(\x0b\x32,.google.cloud.dataqna.v1alpha.Interpretation\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\nuser_email\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x0b\x64\x65\x62ug_flags\x18\t \x01(\x0b\x32(.google.cloud.dataqna.v1alpha.DebugFlagsB\x06\xe0\x41\x05\xe0\x41\x04\x12(\n\ndebug_info\x18\n \x01(\x0b\x32\x14.google.protobuf.Any:b\xea\x41_\n\x1f\x64\x61taqna.googleapis.com/Question\x12<projects/{project}/locations/{location}/questions/{question}\"\xdb\x06\n\x0eInterpretError\x12\x0f\n\x07message\x18\x01 \x01(\t\x12M\n\x04\x63ode\x18\x02 \x01(\x0e\x32?.google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode\x12S\n\x07\x64\x65tails\x18\x03 \x01(\x0b\x32\x42.google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails\x1a\xd1\x02\n\x15InterpretErrorDetails\x12\x65\n\x13unsupported_details\x18\x01 \x01(\x0b\x32H.google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails\x12n\n\x18incomplete_query_details\x18\x02 \x01(\x0b\x32L.google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails\x12\x61\n\x11\x61mbiguity_details\x18\x03 \x01(\x0b\x32\x46.google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails\x1a@\n\x1bInterpretUnsupportedDetails\x12\x11\n\toperators\x18\x01 \x03(\t\x12\x0e\n\x06intent\x18\x02 \x03(\t\x1a\x62\n\x1fInterpretIncompleteQueryDetails\x12?\n\x08\x65ntities\x18\x01 \x03(\x0e\x32-.google.cloud.dataqna.v1alpha.InterpretEntity\x1a\x1b\n\x19InterpretAmbiguityDetails\"}\n\x12InterpretErrorCode\x12$\n INTERPRET_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x11\n\rINVALID_QUERY\x10\x01\x12\x18\n\x14\x46\x41ILED_TO_UNDERSTAND\x10\x02\x12\x14\n\x10\x46\x41ILED_TO_ANSWER\x10\x03\"\x82\x03\n\rExecutionInfo\x12/\n\x13job_creation_status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12Z\n\x13job_execution_state\x18\x02 \x01(\x0e\x32=.google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\x0c\x62igquery_job\x18\x04 \x01(\x0b\x32).google.cloud.dataqna.v1alpha.BigQueryJob\"r\n\x11JobExecutionState\x12#\n\x1fJOB_EXECUTION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_EXECUTED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"C\n\x0b\x42igQueryJob\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\"\xf2\x02\n\x0eInterpretation\x12\x14\n\x0c\x64\x61ta_sources\x18\x01 \x03(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x01\x12\x16\n\x0eunused_phrases\x18\x03 \x03(\t\x12\x43\n\x0ehuman_readable\x18\x04 \x01(\x0b\x32+.google.cloud.dataqna.v1alpha.HumanReadable\x12W\n\x18interpretation_structure\x18\x05 \x01(\x0b\x32\x35.google.cloud.dataqna.v1alpha.InterpretationStructure\x12;\n\ndata_query\x18\x06 \x01(\x0b\x32\'.google.cloud.dataqna.v1alpha.DataQuery\x12\x43\n\x0e\x65xecution_info\x18\x07 \x01(\x0b\x32+.google.cloud.dataqna.v1alpha.ExecutionInfo\"\x18\n\tDataQuery\x12\x0b\n\x03sql\x18\x01 \x01(\t\"\xaa\x01\n\rHumanReadable\x12O\n\x18generated_interpretation\x18\x01 \x01(\x0b\x32-.google.cloud.dataqna.v1alpha.AnnotatedString\x12H\n\x11original_question\x18\x02 \x01(\x0b\x32-.google.cloud.dataqna.v1alpha.AnnotatedString\"\x92\x04\n\x17InterpretationStructure\x12\x64\n\x13visualization_types\x18\x01 \x03(\x0e\x32G.google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType\x12U\n\x0b\x63olumn_info\x18\x02 \x03(\x0b\x32@.google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo\x1a\x38\n\nColumnInfo\x12\x14\n\x0coutput_alias\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xff\x01\n\x11VisualizationType\x12\"\n\x1eVISUALIZATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\r\n\tBAR_CHART\x10\x02\x12\x10\n\x0c\x43OLUMN_CHART\x10\x03\x12\x0c\n\x08TIMELINE\x10\x04\x12\x10\n\x0cSCATTER_PLOT\x10\x05\x12\r\n\tPIE_CHART\x10\x06\x12\x0e\n\nLINE_CHART\x10\x07\x12\x0e\n\nAREA_CHART\x10\x08\x12\x0f\n\x0b\x43OMBO_CHART\x10\t\x12\r\n\tHISTOGRAM\x10\n\x12\x11\n\rGENERIC_CHART\x10\x0b\x12\x18\n\x14\x43HART_NOT_UNDERSTOOD\x10\x0c\"\x95\x03\n\nDebugFlags\x12\x18\n\x10include_va_query\x18\x01 \x01(\x08\x12\x1f\n\x17include_nested_va_query\x18\x02 \x01(\x08\x12$\n\x1cinclude_human_interpretation\x18\x03 \x01(\x08\x12#\n\x1binclude_aqua_debug_response\x18\x04 \x01(\x08\x12\x15\n\rtime_override\x18\x05 \x01(\x03\x12\x1f\n\x17is_internal_google_user\x18\x06 \x01(\x08\x12\x14\n\x0cignore_cache\x18\x07 \x01(\x08\x12#\n\x1binclude_search_entities_rpc\x18\x08 \x01(\x08\x12+\n#include_list_column_annotations_rpc\x18\t \x01(\x08\x12(\n include_virtual_analyst_entities\x18\n \x01(\x08\x12\x1a\n\x12include_table_list\x18\x0b \x01(\x08\x12\x1b\n\x13include_domain_list\x18\x0c \x01(\x08*N\n\x0fInterpretEntity\x12 \n\x1cINTERPRET_ENTITY_UNSPECIFIED\x10\x00\x12\r\n\tDIMENSION\x10\x01\x12\n\n\x06METRIC\x10\x02\x42\xcf\x01\n com.google.cloud.dataqna.v1alphaB\rQuestionProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
|
16
|
+
|
17
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
18
|
+
|
19
|
+
begin
|
20
|
+
pool.add_serialized_file(descriptor_data)
|
21
|
+
rescue TypeError => e
|
22
|
+
# Compatibility code: will be removed in the next major version.
|
23
|
+
require 'google/protobuf/descriptor_pb'
|
24
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
25
|
+
parsed.clear_dependency
|
26
|
+
serialized = parsed.class.encode(parsed)
|
27
|
+
file = pool.add_serialized_file(serialized)
|
28
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
29
|
+
imports = [
|
30
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
31
|
+
["google.protobuf.Any", "google/protobuf/any.proto"],
|
32
|
+
["google.rpc.Status", "google/rpc/status.proto"],
|
33
|
+
["google.cloud.dataqna.v1alpha.AnnotatedString", "google/cloud/dataqna/v1alpha/annotated_string.proto"],
|
34
|
+
]
|
35
|
+
imports.each do |type_name, expected_filename|
|
36
|
+
import_file = pool.lookup(type_name).file_descriptor
|
37
|
+
if import_file.name != expected_filename
|
38
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
127
39
|
end
|
128
40
|
end
|
41
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
42
|
+
warn "This will become an error in the next major version."
|
129
43
|
end
|
130
44
|
|
131
45
|
module Google
|
@@ -148,7 +148,7 @@ module Google
|
|
148
148
|
credentials = @config.credentials
|
149
149
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
150
150
|
# but only if the default endpoint does not have a region prefix.
|
151
|
-
enable_self_signed_jwt = @config.endpoint ==
|
151
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
152
152
|
!@config.endpoint.split(".").first.include?("-")
|
153
153
|
credentials ||= Credentials.default scope: @config.scope,
|
154
154
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -163,7 +163,8 @@ module Google
|
|
163
163
|
credentials: credentials,
|
164
164
|
endpoint: @config.endpoint,
|
165
165
|
channel_args: @config.channel_args,
|
166
|
-
interceptors: @config.interceptors
|
166
|
+
interceptors: @config.interceptors,
|
167
|
+
channel_pool_config: @config.channel_pool
|
167
168
|
)
|
168
169
|
end
|
169
170
|
|
@@ -649,9 +650,9 @@ module Google
|
|
649
650
|
# * (`String`) The path to a service account key file in JSON format
|
650
651
|
# * (`Hash`) A service account key as a Hash
|
651
652
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
652
|
-
# (see the [googleauth docs](https://
|
653
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
653
654
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
654
|
-
# (see the [signet docs](https://
|
655
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
655
656
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
656
657
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
657
658
|
# * (`nil`) indicating no credentials
|
@@ -693,7 +694,9 @@ module Google
|
|
693
694
|
class Configuration
|
694
695
|
extend ::Gapic::Config
|
695
696
|
|
696
|
-
|
697
|
+
DEFAULT_ENDPOINT = "dataqna.googleapis.com"
|
698
|
+
|
699
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
697
700
|
config_attr :credentials, nil do |value|
|
698
701
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
699
702
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -728,6 +731,14 @@ module Google
|
|
728
731
|
end
|
729
732
|
end
|
730
733
|
|
734
|
+
##
|
735
|
+
# Configuration for the channel pool
|
736
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
737
|
+
#
|
738
|
+
def channel_pool
|
739
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
740
|
+
end
|
741
|
+
|
731
742
|
##
|
732
743
|
# Configuration RPC class for the QuestionService API.
|
733
744
|
#
|
@@ -47,7 +47,7 @@ module Google
|
|
47
47
|
# `projects/*/locations/*/questions/*/userFeedback`, which allows access to
|
48
48
|
# user feedback.
|
49
49
|
#
|
50
|
-
#
|
50
|
+
# @example Load this service and instantiate a gRPC client
|
51
51
|
#
|
52
52
|
# require "google/cloud/dataqna/v1alpha/question_service"
|
53
53
|
# client = ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/dataqna/v1alpha/question_service.proto
|
3
4
|
|
@@ -11,28 +12,34 @@ require 'google/cloud/dataqna/v1alpha/question_pb'
|
|
11
12
|
require 'google/cloud/dataqna/v1alpha/user_feedback_pb'
|
12
13
|
require 'google/protobuf/field_mask_pb'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
15
|
+
|
16
|
+
descriptor_data = "\n3google/cloud/dataqna/v1alpha/question_service.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/dataqna/v1alpha/question.proto\x1a\x30google/cloud/dataqna/v1alpha/user_feedback.proto\x1a google/protobuf/field_mask.proto\"z\n\x12GetQuestionRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taqna.googleapis.com/Question\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x91\x01\n\x15\x43reateQuestionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12=\n\x08question\x18\x02 \x01(\x0b\x32&.google.cloud.dataqna.v1alpha.QuestionB\x03\xe0\x41\x02\"N\n\x16\x45xecuteQuestionRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14interpretation_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"S\n\x16GetUserFeedbackRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataqna.googleapis.com/UserFeedback\"\x94\x01\n\x19UpdateUserFeedbackRequest\x12\x46\n\ruser_feedback\x18\x01 \x01(\x0b\x32*.google.cloud.dataqna.v1alpha.UserFeedbackB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xec\x08\n\x0fQuestionService\x12\xaa\x01\n\x0bGetQuestion\x12\x30.google.cloud.dataqna.v1alpha.GetQuestionRequest\x1a&.google.cloud.dataqna.v1alpha.Question\"A\x82\xd3\xe4\x93\x02\x34\x12\x32/v1alpha/{name=projects/*/locations/*/questions/*}\xda\x41\x04name\x12\xc5\x01\n\x0e\x43reateQuestion\x12\x33.google.cloud.dataqna.v1alpha.CreateQuestionRequest\x1a&.google.cloud.dataqna.v1alpha.Question\"V\x82\xd3\xe4\x93\x02>\"2/v1alpha/{parent=projects/*/locations/*}/questions:\x08question\xda\x41\x0fparent,question\x12\xd2\x01\n\x0f\x45xecuteQuestion\x12\x34.google.cloud.dataqna.v1alpha.ExecuteQuestionRequest\x1a&.google.cloud.dataqna.v1alpha.Question\"a\x82\xd3\xe4\x93\x02?\":/v1alpha/{name=projects/*/locations/*/questions/*}:execute:\x01*\xda\x41\x19name,interpretation_index\x12\xc3\x01\n\x0fGetUserFeedback\x12\x34.google.cloud.dataqna.v1alpha.GetUserFeedbackRequest\x1a*.google.cloud.dataqna.v1alpha.UserFeedback\"N\x82\xd3\xe4\x93\x02\x41\x12?/v1alpha/{name=projects/*/locations/*/questions/*/userFeedback}\xda\x41\x04name\x12\xfc\x01\n\x12UpdateUserFeedback\x12\x37.google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest\x1a*.google.cloud.dataqna.v1alpha.UserFeedback\"\x80\x01\x82\xd3\xe4\x93\x02^2M/v1alpha/{user_feedback.name=projects/*/locations/*/questions/*/userFeedback}:\ruser_feedback\xda\x41\x19user_feedback,update_mask\x1aJ\xca\x41\x16\x64\x61taqna.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd6\x01\n com.google.cloud.dataqna.v1alphaB\x14QuestionServiceProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
|
17
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError => e
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
32
|
+
["google.cloud.dataqna.v1alpha.Question", "google/cloud/dataqna/v1alpha/question.proto"],
|
33
|
+
["google.cloud.dataqna.v1alpha.UserFeedback", "google/cloud/dataqna/v1alpha/user_feedback.proto"],
|
34
|
+
]
|
35
|
+
imports.each do |type_name, expected_filename|
|
36
|
+
import_file = pool.lookup(type_name).file_descriptor
|
37
|
+
if import_file.name != expected_filename
|
38
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
34
39
|
end
|
35
40
|
end
|
41
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
42
|
+
warn "This will become an error in the next major version."
|
36
43
|
end
|
37
44
|
|
38
45
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/dataqna/v1alpha/user_feedback.proto
|
3
4
|
|
@@ -6,19 +7,31 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
|
11
|
+
descriptor_data = "\n0google/cloud/dataqna/v1alpha/user_feedback.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd9\x02\n\x0cUserFeedback\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x12\x66ree_form_feedback\x18\x02 \x01(\t\x12M\n\x06rating\x18\x03 \x01(\x0e\x32=.google.cloud.dataqna.v1alpha.UserFeedback.UserFeedbackRating\"V\n\x12UserFeedbackRating\x12$\n USER_FEEDBACK_RATING_UNSPECIFIED\x10\x00\x12\x0c\n\x08POSITIVE\x10\x01\x12\x0c\n\x08NEGATIVE\x10\x02:s\xea\x41p\n#dataqna.googleapis.com/UserFeedback\x12Iprojects/{project}/locations/{location}/questions/{question}/userFeedbackB\xd3\x01\n com.google.cloud.dataqna.v1alphaB\x11UserFeedbackProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
20
31
|
end
|
21
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
22
35
|
end
|
23
36
|
|
24
37
|
module Google
|
@@ -24,9 +24,9 @@ module Google
|
|
24
24
|
module Cloud
|
25
25
|
module DataQnA
|
26
26
|
##
|
27
|
-
#
|
27
|
+
# API client module.
|
28
28
|
#
|
29
|
-
# @example
|
29
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
30
30
|
#
|
31
31
|
# require "google/cloud/dataqna/v1alpha"
|
32
32
|
# client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new
|