google-cloud-dataqna-v1alpha 0.2.2 → 0.2.6
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/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +0 -3
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service/client.rb +52 -40
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service_pb.rb +2 -2
- data/lib/google/cloud/dataqna/v1alpha/auto_suggestion_service_services_pb.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha/question_pb.rb +2 -2
- data/lib/google/cloud/dataqna/v1alpha/question_service/client.rb +144 -56
- data/lib/google/cloud/dataqna/v1alpha/question_service_pb.rb +2 -2
- data/lib/google/cloud/dataqna/v1alpha/question_service_services_pb.rb +1 -1
- data/lib/google/cloud/dataqna/v1alpha/user_feedback_pb.rb +2 -2
- data/lib/google/cloud/dataqna/v1alpha/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- 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: bab8a8b4a01c1981cd37dd3ebc1e0ca1a5f03ca51be84f9ac8aead17b74665ba
|
4
|
+
data.tar.gz: dd95478ed5c737e5d639d34ef3936fc5cdf9fea237906c1471aed66308cd40d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d29a9265f4ec2ccd75af98a12bdb7b0761088457f93b34788028f071c90aee06b12412ec35ec931c3b18923d9bff5da7d1f930948825c292d0a0f9c5697d2ef3
|
7
|
+
data.tar.gz: d9434d5f3ac549fd91b52dc3e5eea58b31bcc0792e1e081550362d64e82ef77acfad144b80966a955a033eeb7099101f331ef8c82df49a6e0fc53822d0c023a4
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -40,9 +40,6 @@ response = client.suggest_queries request
|
|
40
40
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-dataqna-v1alpha/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
|
-
See also the [Product Documentation](https://cloud.google.com/bigquery/docs/dataqna/)
|
44
|
-
for general usage information.
|
45
|
-
|
46
43
|
## Enabling Logging
|
47
44
|
|
48
45
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -106,13 +106,12 @@ module Google
|
|
106
106
|
# See {::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client::Configuration}
|
107
107
|
# for a description of the configuration fields.
|
108
108
|
#
|
109
|
-
#
|
109
|
+
# @example
|
110
110
|
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
# end
|
111
|
+
# # Modify the configuration for all AutoSuggestionService clients
|
112
|
+
# ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.configure do |config|
|
113
|
+
# config.timeout = 10.0
|
114
|
+
# end
|
116
115
|
#
|
117
116
|
# @yield [config] Configure the Client client.
|
118
117
|
# @yieldparam config [Client::Configuration]
|
@@ -161,19 +160,15 @@ module Google
|
|
161
160
|
##
|
162
161
|
# Create a new AutoSuggestionService client object.
|
163
162
|
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
# To create a new AutoSuggestionService client with the default
|
167
|
-
# configuration:
|
163
|
+
# @example
|
168
164
|
#
|
169
|
-
#
|
165
|
+
# # Create a client using the default configuration
|
166
|
+
# client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new
|
170
167
|
#
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
# config.timeout = 10.0
|
176
|
-
# end
|
168
|
+
# # Create a client using a custom configuration
|
169
|
+
# client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new do |config|
|
170
|
+
# config.timeout = 10.0
|
171
|
+
# end
|
177
172
|
#
|
178
173
|
# @yield [config] Configure the AutoSuggestionService client.
|
179
174
|
# @yieldparam config [Client::Configuration]
|
@@ -193,10 +188,9 @@ module Google
|
|
193
188
|
|
194
189
|
# Create credentials
|
195
190
|
credentials = @config.credentials
|
196
|
-
# Use self-signed JWT if the
|
191
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
197
192
|
# but only if the default endpoint does not have a region prefix.
|
198
|
-
enable_self_signed_jwt = @config.
|
199
|
-
@config.endpoint == Client.configure.endpoint &&
|
193
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
200
194
|
!@config.endpoint.split(".").first.include?("-")
|
201
195
|
credentials ||= Credentials.default scope: @config.scope,
|
202
196
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -263,6 +257,21 @@ module Google
|
|
263
257
|
#
|
264
258
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
265
259
|
#
|
260
|
+
# @example Basic example
|
261
|
+
# require "google/cloud/dataqna/v1alpha"
|
262
|
+
#
|
263
|
+
# # Create a client object. The client can be reused for multiple calls.
|
264
|
+
# client = Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new
|
265
|
+
#
|
266
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
267
|
+
# request = Google::Cloud::DataQnA::V1alpha::SuggestQueriesRequest.new
|
268
|
+
#
|
269
|
+
# # Call the suggest_queries method.
|
270
|
+
# result = client.suggest_queries request
|
271
|
+
#
|
272
|
+
# # The returned object is of type Google::Cloud::DataQnA::V1alpha::SuggestQueriesResponse.
|
273
|
+
# p result
|
274
|
+
#
|
266
275
|
def suggest_queries request, options = nil
|
267
276
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
268
277
|
|
@@ -280,16 +289,20 @@ module Google
|
|
280
289
|
gapic_version: ::Google::Cloud::DataQnA::V1alpha::VERSION
|
281
290
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
282
291
|
|
283
|
-
header_params = {
|
284
|
-
|
285
|
-
|
292
|
+
header_params = {}
|
293
|
+
if request.parent
|
294
|
+
header_params["parent"] = request.parent
|
295
|
+
end
|
296
|
+
|
286
297
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
287
298
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
288
299
|
|
289
300
|
options.apply_defaults timeout: @config.rpcs.suggest_queries.timeout,
|
290
301
|
metadata: metadata,
|
291
302
|
retry_policy: @config.rpcs.suggest_queries.retry_policy
|
292
|
-
|
303
|
+
|
304
|
+
options.apply_defaults timeout: @config.timeout,
|
305
|
+
metadata: @config.metadata,
|
293
306
|
retry_policy: @config.retry_policy
|
294
307
|
|
295
308
|
@auto_suggestion_service_stub.call_rpc :suggest_queries, request, options: options do |response, operation|
|
@@ -313,22 +326,21 @@ module Google
|
|
313
326
|
# Configuration can be applied globally to all clients, or to a single client
|
314
327
|
# on construction.
|
315
328
|
#
|
316
|
-
#
|
317
|
-
#
|
318
|
-
#
|
319
|
-
# to 20 seconds,
|
320
|
-
#
|
321
|
-
#
|
322
|
-
#
|
323
|
-
#
|
324
|
-
#
|
325
|
-
#
|
326
|
-
#
|
327
|
-
#
|
328
|
-
#
|
329
|
-
#
|
330
|
-
#
|
331
|
-
# end
|
329
|
+
# @example
|
330
|
+
#
|
331
|
+
# # Modify the global config, setting the timeout for
|
332
|
+
# # suggest_queries to 20 seconds,
|
333
|
+
# # and all remaining timeouts to 10 seconds.
|
334
|
+
# ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.configure do |config|
|
335
|
+
# config.timeout = 10.0
|
336
|
+
# config.rpcs.suggest_queries.timeout = 20.0
|
337
|
+
# end
|
338
|
+
#
|
339
|
+
# # Apply the above configuration only to a new client.
|
340
|
+
# client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new do |config|
|
341
|
+
# config.timeout = 10.0
|
342
|
+
# config.rpcs.suggest_queries.timeout = 20.0
|
343
|
+
# end
|
332
344
|
#
|
333
345
|
# @!attribute [rw] endpoint
|
334
346
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataqna/v1alpha/auto_suggestion_service.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/field_behavior_pb'
|
8
6
|
require 'google/api/resource_pb'
|
9
7
|
require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
|
10
8
|
require 'google/api/client_pb'
|
9
|
+
require 'google/protobuf'
|
10
|
+
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
12
|
add_file("google/cloud/dataqna/v1alpha/auto_suggestion_service.proto", :syntax => :proto3) do
|
13
13
|
add_message "google.cloud.dataqna.v1alpha.SuggestQueriesRequest" do
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataqna/v1alpha/question.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/field_behavior_pb'
|
7
5
|
require 'google/api/resource_pb'
|
8
6
|
require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
|
9
7
|
require 'google/protobuf/any_pb'
|
10
8
|
require 'google/protobuf/timestamp_pb'
|
11
9
|
require 'google/rpc/status_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_file("google/cloud/dataqna/v1alpha/question.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.cloud.dataqna.v1alpha.Question" do
|
@@ -55,13 +55,12 @@ module Google
|
|
55
55
|
# See {::Google::Cloud::DataQnA::V1alpha::QuestionService::Client::Configuration}
|
56
56
|
# for a description of the configuration fields.
|
57
57
|
#
|
58
|
-
#
|
58
|
+
# @example
|
59
59
|
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
# end
|
60
|
+
# # Modify the configuration for all QuestionService clients
|
61
|
+
# ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.configure do |config|
|
62
|
+
# config.timeout = 10.0
|
63
|
+
# end
|
65
64
|
#
|
66
65
|
# @yield [config] Configure the Client client.
|
67
66
|
# @yieldparam config [Client::Configuration]
|
@@ -119,19 +118,15 @@ module Google
|
|
119
118
|
##
|
120
119
|
# Create a new QuestionService client object.
|
121
120
|
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
# To create a new QuestionService client with the default
|
125
|
-
# configuration:
|
126
|
-
#
|
127
|
-
# client = ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
121
|
+
# @example
|
128
122
|
#
|
129
|
-
#
|
130
|
-
#
|
123
|
+
# # Create a client using the default configuration
|
124
|
+
# client = ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
131
125
|
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
126
|
+
# # Create a client using a custom configuration
|
127
|
+
# client = ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new do |config|
|
128
|
+
# config.timeout = 10.0
|
129
|
+
# end
|
135
130
|
#
|
136
131
|
# @yield [config] Configure the QuestionService client.
|
137
132
|
# @yieldparam config [Client::Configuration]
|
@@ -151,10 +146,9 @@ module Google
|
|
151
146
|
|
152
147
|
# Create credentials
|
153
148
|
credentials = @config.credentials
|
154
|
-
# Use self-signed JWT if the
|
149
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
155
150
|
# but only if the default endpoint does not have a region prefix.
|
156
|
-
enable_self_signed_jwt = @config.
|
157
|
-
@config.endpoint == Client.configure.endpoint &&
|
151
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
158
152
|
!@config.endpoint.split(".").first.include?("-")
|
159
153
|
credentials ||= Credentials.default scope: @config.scope,
|
160
154
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -207,6 +201,21 @@ module Google
|
|
207
201
|
#
|
208
202
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
209
203
|
#
|
204
|
+
# @example Basic example
|
205
|
+
# require "google/cloud/dataqna/v1alpha"
|
206
|
+
#
|
207
|
+
# # Create a client object. The client can be reused for multiple calls.
|
208
|
+
# client = Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
209
|
+
#
|
210
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
211
|
+
# request = Google::Cloud::DataQnA::V1alpha::GetQuestionRequest.new
|
212
|
+
#
|
213
|
+
# # Call the get_question method.
|
214
|
+
# result = client.get_question request
|
215
|
+
#
|
216
|
+
# # The returned object is of type Google::Cloud::DataQnA::V1alpha::Question.
|
217
|
+
# p result
|
218
|
+
#
|
210
219
|
def get_question request, options = nil
|
211
220
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
212
221
|
|
@@ -224,16 +233,20 @@ module Google
|
|
224
233
|
gapic_version: ::Google::Cloud::DataQnA::V1alpha::VERSION
|
225
234
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
226
235
|
|
227
|
-
header_params = {
|
228
|
-
|
229
|
-
|
236
|
+
header_params = {}
|
237
|
+
if request.name
|
238
|
+
header_params["name"] = request.name
|
239
|
+
end
|
240
|
+
|
230
241
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
231
242
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
232
243
|
|
233
244
|
options.apply_defaults timeout: @config.rpcs.get_question.timeout,
|
234
245
|
metadata: metadata,
|
235
246
|
retry_policy: @config.rpcs.get_question.retry_policy
|
236
|
-
|
247
|
+
|
248
|
+
options.apply_defaults timeout: @config.timeout,
|
249
|
+
metadata: @config.metadata,
|
237
250
|
retry_policy: @config.retry_policy
|
238
251
|
|
239
252
|
@question_service_stub.call_rpc :get_question, request, options: options do |response, operation|
|
@@ -276,6 +289,21 @@ module Google
|
|
276
289
|
#
|
277
290
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
278
291
|
#
|
292
|
+
# @example Basic example
|
293
|
+
# require "google/cloud/dataqna/v1alpha"
|
294
|
+
#
|
295
|
+
# # Create a client object. The client can be reused for multiple calls.
|
296
|
+
# client = Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
297
|
+
#
|
298
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
299
|
+
# request = Google::Cloud::DataQnA::V1alpha::CreateQuestionRequest.new
|
300
|
+
#
|
301
|
+
# # Call the create_question method.
|
302
|
+
# result = client.create_question request
|
303
|
+
#
|
304
|
+
# # The returned object is of type Google::Cloud::DataQnA::V1alpha::Question.
|
305
|
+
# p result
|
306
|
+
#
|
279
307
|
def create_question request, options = nil
|
280
308
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
281
309
|
|
@@ -293,16 +321,20 @@ module Google
|
|
293
321
|
gapic_version: ::Google::Cloud::DataQnA::V1alpha::VERSION
|
294
322
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
323
|
|
296
|
-
header_params = {
|
297
|
-
|
298
|
-
|
324
|
+
header_params = {}
|
325
|
+
if request.parent
|
326
|
+
header_params["parent"] = request.parent
|
327
|
+
end
|
328
|
+
|
299
329
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
300
330
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
301
331
|
|
302
332
|
options.apply_defaults timeout: @config.rpcs.create_question.timeout,
|
303
333
|
metadata: metadata,
|
304
334
|
retry_policy: @config.rpcs.create_question.retry_policy
|
305
|
-
|
335
|
+
|
336
|
+
options.apply_defaults timeout: @config.timeout,
|
337
|
+
metadata: @config.metadata,
|
306
338
|
retry_policy: @config.retry_policy
|
307
339
|
|
308
340
|
@question_service_stub.call_rpc :create_question, request, options: options do |response, operation|
|
@@ -345,6 +377,21 @@ module Google
|
|
345
377
|
#
|
346
378
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
347
379
|
#
|
380
|
+
# @example Basic example
|
381
|
+
# require "google/cloud/dataqna/v1alpha"
|
382
|
+
#
|
383
|
+
# # Create a client object. The client can be reused for multiple calls.
|
384
|
+
# client = Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
385
|
+
#
|
386
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
387
|
+
# request = Google::Cloud::DataQnA::V1alpha::ExecuteQuestionRequest.new
|
388
|
+
#
|
389
|
+
# # Call the execute_question method.
|
390
|
+
# result = client.execute_question request
|
391
|
+
#
|
392
|
+
# # The returned object is of type Google::Cloud::DataQnA::V1alpha::Question.
|
393
|
+
# p result
|
394
|
+
#
|
348
395
|
def execute_question request, options = nil
|
349
396
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
350
397
|
|
@@ -362,16 +409,20 @@ module Google
|
|
362
409
|
gapic_version: ::Google::Cloud::DataQnA::V1alpha::VERSION
|
363
410
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
364
411
|
|
365
|
-
header_params = {
|
366
|
-
|
367
|
-
|
412
|
+
header_params = {}
|
413
|
+
if request.name
|
414
|
+
header_params["name"] = request.name
|
415
|
+
end
|
416
|
+
|
368
417
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
369
418
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
370
419
|
|
371
420
|
options.apply_defaults timeout: @config.rpcs.execute_question.timeout,
|
372
421
|
metadata: metadata,
|
373
422
|
retry_policy: @config.rpcs.execute_question.retry_policy
|
374
|
-
|
423
|
+
|
424
|
+
options.apply_defaults timeout: @config.timeout,
|
425
|
+
metadata: @config.metadata,
|
375
426
|
retry_policy: @config.retry_policy
|
376
427
|
|
377
428
|
@question_service_stub.call_rpc :execute_question, request, options: options do |response, operation|
|
@@ -413,6 +464,21 @@ module Google
|
|
413
464
|
#
|
414
465
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
415
466
|
#
|
467
|
+
# @example Basic example
|
468
|
+
# require "google/cloud/dataqna/v1alpha"
|
469
|
+
#
|
470
|
+
# # Create a client object. The client can be reused for multiple calls.
|
471
|
+
# client = Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
472
|
+
#
|
473
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
474
|
+
# request = Google::Cloud::DataQnA::V1alpha::GetUserFeedbackRequest.new
|
475
|
+
#
|
476
|
+
# # Call the get_user_feedback method.
|
477
|
+
# result = client.get_user_feedback request
|
478
|
+
#
|
479
|
+
# # The returned object is of type Google::Cloud::DataQnA::V1alpha::UserFeedback.
|
480
|
+
# p result
|
481
|
+
#
|
416
482
|
def get_user_feedback request, options = nil
|
417
483
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
418
484
|
|
@@ -430,16 +496,20 @@ module Google
|
|
430
496
|
gapic_version: ::Google::Cloud::DataQnA::V1alpha::VERSION
|
431
497
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
432
498
|
|
433
|
-
header_params = {
|
434
|
-
|
435
|
-
|
499
|
+
header_params = {}
|
500
|
+
if request.name
|
501
|
+
header_params["name"] = request.name
|
502
|
+
end
|
503
|
+
|
436
504
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
437
505
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
438
506
|
|
439
507
|
options.apply_defaults timeout: @config.rpcs.get_user_feedback.timeout,
|
440
508
|
metadata: metadata,
|
441
509
|
retry_policy: @config.rpcs.get_user_feedback.retry_policy
|
442
|
-
|
510
|
+
|
511
|
+
options.apply_defaults timeout: @config.timeout,
|
512
|
+
metadata: @config.metadata,
|
443
513
|
retry_policy: @config.retry_policy
|
444
514
|
|
445
515
|
@question_service_stub.call_rpc :get_user_feedback, request, options: options do |response, operation|
|
@@ -485,6 +555,21 @@ module Google
|
|
485
555
|
#
|
486
556
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
487
557
|
#
|
558
|
+
# @example Basic example
|
559
|
+
# require "google/cloud/dataqna/v1alpha"
|
560
|
+
#
|
561
|
+
# # Create a client object. The client can be reused for multiple calls.
|
562
|
+
# client = Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
|
563
|
+
#
|
564
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
565
|
+
# request = Google::Cloud::DataQnA::V1alpha::UpdateUserFeedbackRequest.new
|
566
|
+
#
|
567
|
+
# # Call the update_user_feedback method.
|
568
|
+
# result = client.update_user_feedback request
|
569
|
+
#
|
570
|
+
# # The returned object is of type Google::Cloud::DataQnA::V1alpha::UserFeedback.
|
571
|
+
# p result
|
572
|
+
#
|
488
573
|
def update_user_feedback request, options = nil
|
489
574
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
490
575
|
|
@@ -502,16 +587,20 @@ module Google
|
|
502
587
|
gapic_version: ::Google::Cloud::DataQnA::V1alpha::VERSION
|
503
588
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
504
589
|
|
505
|
-
header_params = {
|
506
|
-
|
507
|
-
|
590
|
+
header_params = {}
|
591
|
+
if request.user_feedback&.name
|
592
|
+
header_params["user_feedback.name"] = request.user_feedback.name
|
593
|
+
end
|
594
|
+
|
508
595
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
509
596
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
510
597
|
|
511
598
|
options.apply_defaults timeout: @config.rpcs.update_user_feedback.timeout,
|
512
599
|
metadata: metadata,
|
513
600
|
retry_policy: @config.rpcs.update_user_feedback.retry_policy
|
514
|
-
|
601
|
+
|
602
|
+
options.apply_defaults timeout: @config.timeout,
|
603
|
+
metadata: @config.metadata,
|
515
604
|
retry_policy: @config.retry_policy
|
516
605
|
|
517
606
|
@question_service_stub.call_rpc :update_user_feedback, request, options: options do |response, operation|
|
@@ -535,22 +624,21 @@ module Google
|
|
535
624
|
# Configuration can be applied globally to all clients, or to a single client
|
536
625
|
# on construction.
|
537
626
|
#
|
538
|
-
#
|
539
|
-
#
|
540
|
-
#
|
541
|
-
# to 20 seconds,
|
542
|
-
#
|
543
|
-
#
|
544
|
-
#
|
545
|
-
#
|
546
|
-
#
|
547
|
-
#
|
548
|
-
#
|
549
|
-
#
|
550
|
-
#
|
551
|
-
#
|
552
|
-
#
|
553
|
-
# end
|
627
|
+
# @example
|
628
|
+
#
|
629
|
+
# # Modify the global config, setting the timeout for
|
630
|
+
# # get_question to 20 seconds,
|
631
|
+
# # and all remaining timeouts to 10 seconds.
|
632
|
+
# ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.configure do |config|
|
633
|
+
# config.timeout = 10.0
|
634
|
+
# config.rpcs.get_question.timeout = 20.0
|
635
|
+
# end
|
636
|
+
#
|
637
|
+
# # Apply the above configuration only to a new client.
|
638
|
+
# client = ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new do |config|
|
639
|
+
# config.timeout = 10.0
|
640
|
+
# config.rpcs.get_question.timeout = 20.0
|
641
|
+
# end
|
554
642
|
#
|
555
643
|
# @!attribute [rw] endpoint
|
556
644
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataqna/v1alpha/question_service.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
|
|
10
8
|
require 'google/cloud/dataqna/v1alpha/question_pb'
|
11
9
|
require 'google/cloud/dataqna/v1alpha/user_feedback_pb'
|
12
10
|
require 'google/protobuf/field_mask_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/cloud/dataqna/v1alpha/question_service.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.dataqna.v1alpha.GetQuestionRequest" do
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataqna/v1alpha/user_feedback.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/field_behavior_pb'
|
7
5
|
require 'google/api/resource_pb'
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/cloud/dataqna/v1alpha/user_feedback.proto", :syntax => :proto3) do
|
10
10
|
add_message "google.cloud.dataqna.v1alpha.UserFeedback" do
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
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.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 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.7'
|
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.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.3.4
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: API Client library for the BigQuery Data QnA V1alpha API
|