google-cloud-dataqna-v1alpha 0.2.6 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +14 -9
- data/lib/google/cloud/dataqna/v1alpha/annotated_string_pb.rb +24 -20
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/client.rb +6 -4
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service_pb.rb +27 -29
- data/lib/google/cloud/dataqna/v1alpha/question_pb.rb +30 -115
- data/lib/google/cloud/dataqna/v1alpha/question_service/client.rb +6 -4
- data/lib/google/cloud/dataqna/v1alpha/question_service.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha/question_service_pb.rb +29 -21
- data/lib/google/cloud/dataqna/v1alpha/user_feedback_pb.rb +26 -12
- data/lib/google/cloud/dataqna/v1alpha/version.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha.rb +3 -1
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +4 -1
- 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 +16 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6798ba0890695c7b3696d7534256b6aea5d27d439c9cfa77c0a1f25044cef2cf
|
4
|
+
data.tar.gz: c808c31f48cee6bcd66d131236c6e70a4fff805f23572ebacc1082dd8f030b05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cabd5f7b929c194c4413d929ac86728027363db1be7189db1b97e69afa8a8d2cff296f41973198c12e6a3a70d0eaadbf971c3c24a48c655ac9eebc0c56319f52
|
7
|
+
data.tar.gz: fde68b3e1efa21066b7183578ba9bd9da9da684be26ff232fabe3ff91b637768106cfd0f043d7a0f87c0d3eb95fefdc4f0dcd50634ab60c5846bf2347c5fb9c8
|
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
|
|
@@ -37,14 +37,14 @@ request = ::Google::Cloud::DataQnA::V1alpha::SuggestQueriesRequest.new # (reques
|
|
37
37
|
response = client.suggest_queries request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataqna-v1alpha/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
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
|
|
@@ -66,16 +66,21 @@ module GRPC
|
|
66
66
|
end
|
67
67
|
```
|
68
68
|
|
69
|
+
|
70
|
+
## Google Cloud Samples
|
71
|
+
|
72
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
73
|
+
|
69
74
|
## Supported Ruby Versions
|
70
75
|
|
71
|
-
This library is supported on Ruby 2.
|
76
|
+
This library is supported on Ruby 2.6+.
|
72
77
|
|
73
78
|
Google provides official support for Ruby versions that are actively supported
|
74
79
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
75
|
-
in security maintenance, and not end of life.
|
76
|
-
|
77
|
-
|
78
|
-
|
80
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
81
|
+
still work, but are unsupported and not recommended. See
|
82
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
83
|
+
support schedule.
|
79
84
|
|
80
85
|
## Which client should I use?
|
81
86
|
|
@@ -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
|
@@ -351,9 +351,9 @@ module Google
|
|
351
351
|
# * (`String`) The path to a service account key file in JSON format
|
352
352
|
# * (`Hash`) A service account key as a Hash
|
353
353
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
354
|
-
# (see the [googleauth docs](https://
|
354
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
355
355
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
356
|
-
# (see the [signet docs](https://
|
356
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
357
357
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
358
358
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
359
359
|
# * (`nil`) indicating no credentials
|
@@ -395,7 +395,9 @@ module Google
|
|
395
395
|
class Configuration
|
396
396
|
extend ::Gapic::Config
|
397
397
|
|
398
|
-
|
398
|
+
DEFAULT_ENDPOINT = "dataqna.googleapis.com"
|
399
|
+
|
400
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
399
401
|
config_attr :credentials, nil do |value|
|
400
402
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
401
403
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -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,43 +1,41 @@
|
|
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
|
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
4
7
|
require 'google/api/annotations_pb'
|
5
8
|
require 'google/api/field_behavior_pb'
|
6
9
|
require 'google/api/resource_pb'
|
7
10
|
require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
|
8
11
|
require 'google/api/client_pb'
|
9
|
-
require 'google/protobuf'
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
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}"
|
39
35
|
end
|
40
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."
|
41
39
|
end
|
42
40
|
|
43
41
|
module Google
|
@@ -1,130 +1,45 @@
|
|
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
|
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
4
7
|
require 'google/api/field_behavior_pb'
|
5
8
|
require 'google/api/resource_pb'
|
6
9
|
require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
|
7
10
|
require 'google/protobuf/any_pb'
|
8
11
|
require 'google/protobuf/timestamp_pb'
|
9
12
|
require 'google/rpc/status_pb'
|
10
|
-
require 'google/protobuf'
|
11
13
|
|
12
|
-
|
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
|
-
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
|
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}"
|
126
39
|
end
|
127
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."
|
128
43
|
end
|
129
44
|
|
130
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
|
@@ -649,9 +649,9 @@ module Google
|
|
649
649
|
# * (`String`) The path to a service account key file in JSON format
|
650
650
|
# * (`Hash`) A service account key as a Hash
|
651
651
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
652
|
-
# (see the [googleauth docs](https://
|
652
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
653
653
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
654
|
-
# (see the [signet docs](https://
|
654
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
655
655
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
656
656
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
657
657
|
# * (`nil`) indicating no credentials
|
@@ -693,7 +693,9 @@ module Google
|
|
693
693
|
class Configuration
|
694
694
|
extend ::Gapic::Config
|
695
695
|
|
696
|
-
|
696
|
+
DEFAULT_ENDPOINT = "dataqna.googleapis.com"
|
697
|
+
|
698
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
697
699
|
config_attr :credentials, nil do |value|
|
698
700
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
699
701
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -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,6 +1,9 @@
|
|
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
|
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
4
7
|
require 'google/api/annotations_pb'
|
5
8
|
require 'google/api/client_pb'
|
6
9
|
require 'google/api/field_behavior_pb'
|
@@ -8,30 +11,35 @@ require 'google/api/resource_pb'
|
|
8
11
|
require 'google/cloud/dataqna/v1alpha/question_pb'
|
9
12
|
require 'google/cloud/dataqna/v1alpha/user_feedback_pb'
|
10
13
|
require 'google/protobuf/field_mask_pb'
|
11
|
-
require 'google/protobuf'
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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}"
|
33
39
|
end
|
34
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."
|
35
43
|
end
|
36
44
|
|
37
45
|
module Google
|
@@ -1,23 +1,37 @@
|
|
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
|
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
4
7
|
require 'google/api/field_behavior_pb'
|
5
8
|
require 'google/api/resource_pb'
|
6
|
-
require 'google/protobuf'
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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}"
|
19
31
|
end
|
20
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."
|
21
35
|
end
|
22
36
|
|
23
37
|
module Google
|
@@ -24,7 +24,9 @@ module Google
|
|
24
24
|
module Cloud
|
25
25
|
module DataQnA
|
26
26
|
##
|
27
|
-
#
|
27
|
+
# API client module.
|
28
|
+
#
|
29
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
28
30
|
#
|
29
31
|
# require "google/cloud/dataqna/v1alpha"
|
30
32
|
# client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new
|