google-cloud-dataqna 0.8.1 → 0.8.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 295efbf62d1b025ae3bb7b78f23506e1575e43a65cc00c1ed7f1e4f708e47873
4
- data.tar.gz: 65fea08f83a5139db83ed554b934e4a3c6e2f30241881613f27442b0dc9ef49a
3
+ metadata.gz: ed7c88431073b014a551e5b464ca5871ac94b6200e205c27c14582b5e4fe3047
4
+ data.tar.gz: 2e713eeaf43e9ed47b3563abb89df24a0cc0db3ac3aeac92fd5d901ac9470a12
5
5
  SHA512:
6
- metadata.gz: b25066c642435dab9741069d56b58dac2b6af0f4edd1bfad6bbf1ea121c7e9e1f98c93855a91d8d4453f68792ed9900046cb4ae287540528e803bbee59863ef7
7
- data.tar.gz: 2b11e2cb888897929c6df7904c56686a02a748202ea3f2fd6c55cab75b32199bd74aa398ee6fd360794d303dc6c55e6731e6bc8ef1e660113e158835d5a952f8
6
+ metadata.gz: ed7fcc32cff05a5c6aaef43c6febf31ffc85ebabccb5cb0aaeac480292233f5f1668d057a67a304cbc1bf41347bfc96e3e80d8a368b06d03ca6f1e74e58d0e4e
7
+ data.tar.gz: 03ac3638e510b656c28ecee8d08d4e602b28218caa2dd80bfe676eab256beb685a045cb7322d881c8cafbf067fd2c77ca7a09c8c7f5df41fc338cde7cd7689c5
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title="BigQuery Data QnA API"
2
+ --title="Data QnA API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/README.md CHANGED
@@ -1,9 +1,8 @@
1
- # Ruby Client for the BigQuery Data QnA API
2
-
3
- API Client library for the BigQuery Data QnA API
1
+ # Ruby Client for the Data QnA API
4
2
 
5
3
  Data QnA is a natural language question and answer service for BigQuery data.
6
4
 
5
+
7
6
  Actual client classes for the various versions of this API are defined in
8
7
  _versioned_ client gems, with names of the form `google-cloud-dataqna-v*`.
9
8
  The gem `google-cloud-dataqna` is the main client library that brings the
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module DataQnA
23
- VERSION = "0.8.1"
23
+ VERSION = "0.8.2"
24
24
  end
25
25
  end
26
26
  end
@@ -55,9 +55,11 @@ module Google
55
55
  # `version` parameter. If the AutoSuggestionService service is
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
59
+ # the `transport` parameter.
58
60
  #
59
61
  # Raises an exception if the currently installed versioned client gem for the
60
- # given API version does not support the AutoSuggestionService service.
62
+ # given API version does not support the given transport of the AutoSuggestionService service.
61
63
  # You can determine whether the method will succeed by calling
62
64
  # {Google::Cloud::DataQnA.auto_suggestion_service_available?}.
63
65
  #
@@ -132,9 +134,10 @@ module Google
132
134
  #
133
135
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
134
136
  # Defaults to `:v1alpha`.
137
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
135
138
  # @return [::Object] A client object for the specified version.
136
139
  #
137
- def self.auto_suggestion_service version: :v1alpha, &block
140
+ def self.auto_suggestion_service version: :v1alpha, transport: :grpc, &block
138
141
  require "google/cloud/dataqna/#{version.to_s.downcase}"
139
142
 
140
143
  package_name = Google::Cloud::DataQnA
@@ -142,6 +145,7 @@ module Google
142
145
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
143
146
  .first
144
147
  service_module = Google::Cloud::DataQnA.const_get(package_name).const_get(:AutoSuggestionService)
148
+ service_module = service_module.const_get(:Rest) if transport == :rest
145
149
  service_module.const_get(:Client).new(&block)
146
150
  end
147
151
 
@@ -154,9 +158,10 @@ module Google
154
158
  #
155
159
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
156
160
  # Defaults to `:v1alpha`.
161
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
157
162
  # @return [boolean] Whether the service is available.
158
163
  #
159
- def self.auto_suggestion_service_available? version: :v1alpha
164
+ def self.auto_suggestion_service_available? version: :v1alpha, transport: :grpc
160
165
  require "google/cloud/dataqna/#{version.to_s.downcase}"
161
166
  package_name = Google::Cloud::DataQnA
162
167
  .constants
@@ -166,6 +171,10 @@ module Google
166
171
  service_module = Google::Cloud::DataQnA.const_get package_name
167
172
  return false unless service_module.const_defined? :AutoSuggestionService
168
173
  service_module = service_module.const_get :AutoSuggestionService
174
+ if transport == :rest
175
+ return false unless service_module.const_defined? :Rest
176
+ service_module = service_module.const_get :Rest
177
+ end
169
178
  service_module.const_defined? :Client
170
179
  rescue ::LoadError
171
180
  false
@@ -181,9 +190,11 @@ module Google
181
190
  # `version` parameter. If the QuestionService service is
182
191
  # supported by that API version, and the corresponding gem is available, the
183
192
  # appropriate versioned client will be returned.
193
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
194
+ # the `transport` parameter.
184
195
  #
185
196
  # Raises an exception if the currently installed versioned client gem for the
186
- # given API version does not support the QuestionService service.
197
+ # given API version does not support the given transport of the QuestionService service.
187
198
  # You can determine whether the method will succeed by calling
188
199
  # {Google::Cloud::DataQnA.question_service_available?}.
189
200
  #
@@ -207,9 +218,10 @@ module Google
207
218
  #
208
219
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
209
220
  # Defaults to `:v1alpha`.
221
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
210
222
  # @return [::Object] A client object for the specified version.
211
223
  #
212
- def self.question_service version: :v1alpha, &block
224
+ def self.question_service version: :v1alpha, transport: :grpc, &block
213
225
  require "google/cloud/dataqna/#{version.to_s.downcase}"
214
226
 
215
227
  package_name = Google::Cloud::DataQnA
@@ -217,6 +229,7 @@ module Google
217
229
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
218
230
  .first
219
231
  service_module = Google::Cloud::DataQnA.const_get(package_name).const_get(:QuestionService)
232
+ service_module = service_module.const_get(:Rest) if transport == :rest
220
233
  service_module.const_get(:Client).new(&block)
221
234
  end
222
235
 
@@ -229,9 +242,10 @@ module Google
229
242
  #
230
243
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
231
244
  # Defaults to `:v1alpha`.
245
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
232
246
  # @return [boolean] Whether the service is available.
233
247
  #
234
- def self.question_service_available? version: :v1alpha
248
+ def self.question_service_available? version: :v1alpha, transport: :grpc
235
249
  require "google/cloud/dataqna/#{version.to_s.downcase}"
236
250
  package_name = Google::Cloud::DataQnA
237
251
  .constants
@@ -241,6 +255,10 @@ module Google
241
255
  service_module = Google::Cloud::DataQnA.const_get package_name
242
256
  return false unless service_module.const_defined? :QuestionService
243
257
  service_module = service_module.const_get :QuestionService
258
+ if transport == :rest
259
+ return false unless service_module.const_defined? :Rest
260
+ service_module = service_module.const_get :Rest
261
+ end
244
262
  service_module.const_defined? :Client
245
263
  rescue ::LoadError
246
264
  false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dataqna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -77,5 +77,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  requirements: []
78
78
  rubygems_version: 3.6.9
79
79
  specification_version: 4
80
- summary: API Client library for the BigQuery Data QnA API
80
+ summary: Data QnA is a natural language question and answer service for BigQuery data.
81
81
  test_files: []