google-cloud-dataqna-v1alpha 0.7.2 → 0.8.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 +30 -20
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/client.rb +27 -2
- data/lib/google/cloud/dataqna/v1alpha/question_service/client.rb +27 -6
- data/lib/google/cloud/dataqna/v1alpha/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c0acdf4c44b54ca565aa82267b5b387fb4e22f914e5070fb88d74cfa22bba06
|
4
|
+
data.tar.gz: 5141b751dc8bc4a17ec792d1412e6f3334af0cd989110c037a7e12b103d8cf60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bfacbf38a567bb950a62abde75fbe6084024e1c66e9ea1ec061e2441f0faf563d293e42322c4d906a22d02aae2b88f2cad8adc8f1e2b76afaf4ad275c2195ee
|
7
|
+
data.tar.gz: 7d81cc89aef757222bb5ef049f2437b78eeeb5c9cc42ea670b4a8a9a8ccc521447913e48395d2668a87ece2531c11258c770711f5187e84f87319bce2734a7aa
|
data/README.md
CHANGED
@@ -39,33 +39,43 @@ 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).
|
@@ -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)
|
@@ -416,6 +435,11 @@ module Google
|
|
416
435
|
# default endpoint URL. The default value of nil uses the environment
|
417
436
|
# universe (usually the default "googleapis.com" universe).
|
418
437
|
# @return [::String,nil]
|
438
|
+
# @!attribute [rw] logger
|
439
|
+
# A custom logger to use for request/response debug logging, or the value
|
440
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
441
|
+
# explicitly disable logging.
|
442
|
+
# @return [::Logger,:default,nil]
|
419
443
|
#
|
420
444
|
class Configuration
|
421
445
|
extend ::Gapic::Config
|
@@ -440,6 +464,7 @@ module Google
|
|
440
464
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
441
465
|
config_attr :quota_project, nil, ::String, nil
|
442
466
|
config_attr :universe_domain, nil, ::String, nil
|
467
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
443
468
|
|
444
469
|
# @private
|
445
470
|
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)
|
@@ -718,6 +733,11 @@ module Google
|
|
718
733
|
# default endpoint URL. The default value of nil uses the environment
|
719
734
|
# universe (usually the default "googleapis.com" universe).
|
720
735
|
# @return [::String,nil]
|
736
|
+
# @!attribute [rw] logger
|
737
|
+
# A custom logger to use for request/response debug logging, or the value
|
738
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
739
|
+
# explicitly disable logging.
|
740
|
+
# @return [::Logger,:default,nil]
|
721
741
|
#
|
722
742
|
class Configuration
|
723
743
|
extend ::Gapic::Config
|
@@ -742,6 +762,7 @@ module Google
|
|
742
762
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
743
763
|
config_attr :quota_project, nil, ::String, nil
|
744
764
|
config_attr :universe_domain, nil, ::String, nil
|
765
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
745
766
|
|
746
767
|
# @private
|
747
768
|
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,14 @@
|
|
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.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
rubygems_version: 3.5.
|
112
|
+
rubygems_version: 3.5.23
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Data QnA is a natural language question and answer service for BigQuery data.
|