google-cloud-dataqna-v1alpha 0.7.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/client.rb +34 -2
- data/lib/google/cloud/dataqna/v1alpha/question_service/client.rb +34 -6
- data/lib/google/cloud/dataqna/v1alpha/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79107d2223c34e360742b0fa4ad46334c68a95807eb8756af7db0acd5fb4fba2
|
4
|
+
data.tar.gz: 3ca59a67dcc651830be9af8bfdbb9e8aeb28f1a11f53abb514683226e09baa8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a94424735fb60da24933a62418120462dcd9a18d940501def9a78cb6b97b276bbb396ecb155e11f9be20b0d1e204e829e3cf73a8bc0c186a060ce917c9a045af
|
7
|
+
data.tar.gz: 4a8d0cd94ccd47c94172baa2e2aa231fe2a5307b933c085810418db8534198a40be314ec1ae443a6dbc6be1b06d9c2299a6540ea3f5128ea290711bfa3f5a86d
|
data/README.md
CHANGED
@@ -39,40 +39,50 @@ response = client.suggest_queries request
|
|
39
39
|
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataqna-v1alpha/latest)
|
40
40
|
for class and method documentation.
|
41
41
|
|
42
|
-
##
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
## Debug Logging
|
43
|
+
|
44
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
45
|
+
your application's integration with the API. When logging is activated, key
|
46
|
+
events such as requests and responses, along with data payloads and metadata
|
47
|
+
such as headers and client configuration, are logged to the standard error
|
48
|
+
stream.
|
49
|
+
|
50
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
51
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
52
|
+
customers, private keys, or other security data that could be compromising if
|
53
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
54
|
+
the principle of least access. Google also recommends that Client Library Debug
|
55
|
+
Logging be enabled only temporarily during active debugging, and not used
|
56
|
+
permanently in production.
|
57
|
+
|
58
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
59
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
60
|
+
list of client library gem names. This will select the default logging behavior,
|
61
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
62
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
63
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
64
|
+
results in logs appearing alongside your application logs in the
|
65
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
66
|
+
|
67
|
+
You can customize logging by modifying the `logger` configuration when
|
68
|
+
constructing a client object. For example:
|
51
69
|
|
52
70
|
```ruby
|
71
|
+
require "google/cloud/dataqna/v1alpha"
|
53
72
|
require "logger"
|
54
73
|
|
55
|
-
|
56
|
-
|
57
|
-
def logger
|
58
|
-
LOGGER
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
63
|
-
module GRPC
|
64
|
-
extend MyLogger
|
74
|
+
client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new do |config|
|
75
|
+
config.logger = Logger.new "my-app.log"
|
65
76
|
end
|
66
77
|
```
|
67
78
|
|
68
|
-
|
69
79
|
## Google Cloud Samples
|
70
80
|
|
71
81
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
72
82
|
|
73
83
|
## Supported Ruby Versions
|
74
84
|
|
75
|
-
This library is supported on Ruby
|
85
|
+
This library is supported on Ruby 3.0+.
|
76
86
|
|
77
87
|
Google provides official support for Ruby versions that are actively supported
|
78
88
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -224,8 +224,28 @@ module Google
|
|
224
224
|
universe_domain: @config.universe_domain,
|
225
225
|
channel_args: @config.channel_args,
|
226
226
|
interceptors: @config.interceptors,
|
227
|
-
channel_pool_config: @config.channel_pool
|
227
|
+
channel_pool_config: @config.channel_pool,
|
228
|
+
logger: @config.logger
|
228
229
|
)
|
230
|
+
|
231
|
+
@auto_suggestion_service_stub.stub_logger&.info do |entry|
|
232
|
+
entry.set_system_name
|
233
|
+
entry.set_service
|
234
|
+
entry.message = "Created client for #{entry.service}"
|
235
|
+
entry.set_credentials_fields credentials
|
236
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
237
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
238
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
##
|
243
|
+
# The logger used for request/response debug logging.
|
244
|
+
#
|
245
|
+
# @return [Logger]
|
246
|
+
#
|
247
|
+
def logger
|
248
|
+
@auto_suggestion_service_stub.logger
|
229
249
|
end
|
230
250
|
|
231
251
|
# Service calls
|
@@ -327,7 +347,6 @@ module Google
|
|
327
347
|
|
328
348
|
@auto_suggestion_service_stub.call_rpc :suggest_queries, request, options: options do |response, operation|
|
329
349
|
yield response, operation if block_given?
|
330
|
-
return response
|
331
350
|
end
|
332
351
|
rescue ::GRPC::BadStatus => e
|
333
352
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -377,6 +396,13 @@ module Google
|
|
377
396
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
378
397
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
379
398
|
# * (`nil`) indicating no credentials
|
399
|
+
#
|
400
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
401
|
+
# external source for authentication to Google Cloud, you must validate it before
|
402
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
403
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
404
|
+
# For more information, refer to [Validate credential configurations from external
|
405
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
380
406
|
# @return [::Object]
|
381
407
|
# @!attribute [rw] scope
|
382
408
|
# The OAuth scopes
|
@@ -416,6 +442,11 @@ module Google
|
|
416
442
|
# default endpoint URL. The default value of nil uses the environment
|
417
443
|
# universe (usually the default "googleapis.com" universe).
|
418
444
|
# @return [::String,nil]
|
445
|
+
# @!attribute [rw] logger
|
446
|
+
# A custom logger to use for request/response debug logging, or the value
|
447
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
448
|
+
# explicitly disable logging.
|
449
|
+
# @return [::Logger,:default,nil]
|
419
450
|
#
|
420
451
|
class Configuration
|
421
452
|
extend ::Gapic::Config
|
@@ -440,6 +471,7 @@ module Google
|
|
440
471
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
441
472
|
config_attr :quota_project, nil, ::String, nil
|
442
473
|
config_attr :universe_domain, nil, ::String, nil
|
474
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
443
475
|
|
444
476
|
# @private
|
445
477
|
def initialize parent_config = nil
|
@@ -182,8 +182,28 @@ module Google
|
|
182
182
|
universe_domain: @config.universe_domain,
|
183
183
|
channel_args: @config.channel_args,
|
184
184
|
interceptors: @config.interceptors,
|
185
|
-
channel_pool_config: @config.channel_pool
|
185
|
+
channel_pool_config: @config.channel_pool,
|
186
|
+
logger: @config.logger
|
186
187
|
)
|
188
|
+
|
189
|
+
@question_service_stub.stub_logger&.info do |entry|
|
190
|
+
entry.set_system_name
|
191
|
+
entry.set_service
|
192
|
+
entry.message = "Created client for #{entry.service}"
|
193
|
+
entry.set_credentials_fields credentials
|
194
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
195
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
196
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# The logger used for request/response debug logging.
|
202
|
+
#
|
203
|
+
# @return [Logger]
|
204
|
+
#
|
205
|
+
def logger
|
206
|
+
@question_service_stub.logger
|
187
207
|
end
|
188
208
|
|
189
209
|
# Service calls
|
@@ -271,7 +291,6 @@ module Google
|
|
271
291
|
|
272
292
|
@question_service_stub.call_rpc :get_question, request, options: options do |response, operation|
|
273
293
|
yield response, operation if block_given?
|
274
|
-
return response
|
275
294
|
end
|
276
295
|
rescue ::GRPC::BadStatus => e
|
277
296
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -360,7 +379,6 @@ module Google
|
|
360
379
|
|
361
380
|
@question_service_stub.call_rpc :create_question, request, options: options do |response, operation|
|
362
381
|
yield response, operation if block_given?
|
363
|
-
return response
|
364
382
|
end
|
365
383
|
rescue ::GRPC::BadStatus => e
|
366
384
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -449,7 +467,6 @@ module Google
|
|
449
467
|
|
450
468
|
@question_service_stub.call_rpc :execute_question, request, options: options do |response, operation|
|
451
469
|
yield response, operation if block_given?
|
452
|
-
return response
|
453
470
|
end
|
454
471
|
rescue ::GRPC::BadStatus => e
|
455
472
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -537,7 +554,6 @@ module Google
|
|
537
554
|
|
538
555
|
@question_service_stub.call_rpc :get_user_feedback, request, options: options do |response, operation|
|
539
556
|
yield response, operation if block_given?
|
540
|
-
return response
|
541
557
|
end
|
542
558
|
rescue ::GRPC::BadStatus => e
|
543
559
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -629,7 +645,6 @@ module Google
|
|
629
645
|
|
630
646
|
@question_service_stub.call_rpc :update_user_feedback, request, options: options do |response, operation|
|
631
647
|
yield response, operation if block_given?
|
632
|
-
return response
|
633
648
|
end
|
634
649
|
rescue ::GRPC::BadStatus => e
|
635
650
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -679,6 +694,13 @@ module Google
|
|
679
694
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
680
695
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
681
696
|
# * (`nil`) indicating no credentials
|
697
|
+
#
|
698
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
699
|
+
# external source for authentication to Google Cloud, you must validate it before
|
700
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
701
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
702
|
+
# For more information, refer to [Validate credential configurations from external
|
703
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
682
704
|
# @return [::Object]
|
683
705
|
# @!attribute [rw] scope
|
684
706
|
# The OAuth scopes
|
@@ -718,6 +740,11 @@ module Google
|
|
718
740
|
# default endpoint URL. The default value of nil uses the environment
|
719
741
|
# universe (usually the default "googleapis.com" universe).
|
720
742
|
# @return [::String,nil]
|
743
|
+
# @!attribute [rw] logger
|
744
|
+
# A custom logger to use for request/response debug logging, or the value
|
745
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
746
|
+
# explicitly disable logging.
|
747
|
+
# @return [::Logger,:default,nil]
|
721
748
|
#
|
722
749
|
class Configuration
|
723
750
|
extend ::Gapic::Config
|
@@ -742,6 +769,7 @@ module Google
|
|
742
769
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
743
770
|
config_attr :quota_project, nil, ::String, nil
|
744
771
|
config_attr :universe_domain, nil, ::String, nil
|
772
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
745
773
|
|
746
774
|
# @private
|
747
775
|
def initialize parent_config = nil
|
@@ -28,6 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] destinations
|
29
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
30
30
|
# The destination where API teams want this client library to be published.
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
31
34
|
class CommonLanguageSettings
|
32
35
|
include ::Google::Protobuf::MessageExts
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -212,6 +215,12 @@ module Google
|
|
212
215
|
# enabled. By default, asynchronous REST clients will not be generated.
|
213
216
|
# This feature will be enabled by default 1 month after launching the
|
214
217
|
# feature in preview packages.
|
218
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
219
|
+
# @return [::Boolean]
|
220
|
+
# Enables generation of protobuf code using new types that are more
|
221
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
222
|
+
# enabled by default 1 month after launching the feature in preview
|
223
|
+
# packages.
|
215
224
|
class ExperimentalFeatures
|
216
225
|
include ::Google::Protobuf::MessageExts
|
217
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,9 +306,28 @@ module Google
|
|
297
306
|
# @!attribute [rw] common
|
298
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
299
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
300
319
|
class GoSettings
|
301
320
|
include ::Google::Protobuf::MessageExts
|
302
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
303
331
|
end
|
304
332
|
|
305
333
|
# Describes the generator configuration for a method.
|
@@ -375,6 +403,17 @@ module Google
|
|
375
403
|
end
|
376
404
|
end
|
377
405
|
|
406
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
407
|
+
# a service for client libraries.
|
408
|
+
# @!attribute [rw] methods
|
409
|
+
# @return [::Array<::String>]
|
410
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
411
|
+
# on public client surfaces.
|
412
|
+
class SelectiveGapicGeneration
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
end
|
416
|
+
|
378
417
|
# The organization for which the client libraries are being published.
|
379
418
|
# Affects the url where generated docs are published, etc.
|
380
419
|
module ClientLibraryOrganization
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-dataqna-v1alpha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: gapic-common
|
@@ -16,7 +15,7 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: 0.25.0
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.a
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
28
|
+
version: 0.25.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 2.a
|
@@ -94,7 +93,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
94
93
|
licenses:
|
95
94
|
- Apache-2.0
|
96
95
|
metadata: {}
|
97
|
-
post_install_message:
|
98
96
|
rdoc_options: []
|
99
97
|
require_paths:
|
100
98
|
- lib
|
@@ -102,15 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
100
|
requirements:
|
103
101
|
- - ">="
|
104
102
|
- !ruby/object:Gem::Version
|
105
|
-
version: '
|
103
|
+
version: '3.0'
|
106
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
105
|
requirements:
|
108
106
|
- - ">="
|
109
107
|
- !ruby/object:Gem::Version
|
110
108
|
version: '0'
|
111
109
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
113
|
-
signing_key:
|
110
|
+
rubygems_version: 3.6.2
|
114
111
|
specification_version: 4
|
115
112
|
summary: Data QnA is a natural language question and answer service for BigQuery data.
|
116
113
|
test_files: []
|