google-cloud-retail 1.4.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecbf42a8ddb8eca22c559621073600bc341e91f27b7b942877a78df58475d280
4
- data.tar.gz: 0531a056012fb57a7f5f5215b9a6580caa5970c467b1401995f1dedf8270c40a
3
+ metadata.gz: 060ad8166da2508d4e0127a9ea5e6f01006df1292a2257d839ed508831443e27
4
+ data.tar.gz: 805a0e8891dc8e2caecc5562e8fda00bff4ab054589ed4fd2f9eba5ca34dbd17
5
5
  SHA512:
6
- metadata.gz: 5f9b4a89d048a3de2482e8f0d1e838c8161798ad9b890dcc5a7af98c260f082939372855ac6eefe5d17dcb6331165a707b0bc5acd3f55daba152a9cad95dded4
7
- data.tar.gz: 2fed92768a291225b2329ede64883770ea77554e818f45939a19a5db2147b0af2f7e710a19c419d6030b79af8ef9f451eee492f07ff6fe21a4e395a3d7729481
6
+ metadata.gz: 712c9e42532350d27aacd7204c9cb1df90ee6fa25602d67bbea01ce63cc1f6970256a5145594cd086873f41e6fa32d218acf8a73d89173499637cb97bccdaf1c
7
+ data.tar.gz: 216e17b1fe6a35c44fc92f38802179a049519ab9b42773d87d69fc9aae98115a479d38e1fe478eace2b1835a39332493200e2e811502aa5d53dc948505a64475
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
@@ -16,7 +16,7 @@ for this library, google-cloud-retail, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-retail-v2](https://googleapis.dev/ruby/google-cloud-retail-v2/latest).
19
+ [google-cloud-retail-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest).
20
20
 
21
21
  See also the [Product Documentation](https://cloud.google.com/retail/docs/apis)
22
22
  for more usage information.
@@ -34,32 +34,6 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/retail.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
42
- 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)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Retail
23
- VERSION = "1.4.0"
23
+ VERSION = "1.6.0"
24
24
  end
25
25
  end
26
26
  end
@@ -48,12 +48,14 @@ module Google
48
48
  # Create a new client object for CatalogService.
49
49
  #
50
50
  # By default, this returns an instance of
51
- # [Google::Cloud::Retail::V2::CatalogService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/CatalogService/Client.html)
52
- # for version V2 of the API.
53
- # However, you can specify specify a different API version by passing it in the
51
+ # [Google::Cloud::Retail::V2::CatalogService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogService-Client)
52
+ # for a gRPC client for version V2 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the CatalogService service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About CatalogService
59
61
  #
@@ -61,62 +63,70 @@ module Google
61
63
  #
62
64
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
63
65
  # Defaults to `:v2`.
64
- # @return [CatalogService::Client] A client object for the specified version.
66
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
67
+ # @return [::Object] A client object for the specified version.
65
68
  #
66
- def self.catalog_service version: :v2, &block
69
+ def self.catalog_service version: :v2, transport: :grpc, &block
67
70
  require "google/cloud/retail/#{version.to_s.downcase}"
68
71
 
69
72
  package_name = Google::Cloud::Retail
70
73
  .constants
71
74
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
72
75
  .first
73
- package_module = Google::Cloud::Retail.const_get package_name
74
- package_module.const_get(:CatalogService).const_get(:Client).new(&block)
76
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:CatalogService)
77
+ service_module = service_module.const_get(:Rest) if transport == :rest
78
+ service_module.const_get(:Client).new(&block)
75
79
  end
76
80
 
77
81
  ##
78
82
  # Create a new client object for CompletionService.
79
83
  #
80
84
  # By default, this returns an instance of
81
- # [Google::Cloud::Retail::V2::CompletionService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/CompletionService/Client.html)
82
- # for version V2 of the API.
83
- # However, you can specify specify a different API version by passing it in the
85
+ # [Google::Cloud::Retail::V2::CompletionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CompletionService-Client)
86
+ # for a gRPC client for version V2 of the API.
87
+ # However, you can specify a different API version by passing it in the
84
88
  # `version` parameter. If the CompletionService service is
85
89
  # supported by that API version, and the corresponding gem is available, the
86
90
  # appropriate versioned client will be returned.
91
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
92
+ # the `transport` parameter.
87
93
  #
88
94
  # ## About CompletionService
89
95
  #
90
- # Auto-completion service for retail.
96
+ # Autocomplete service for retail.
91
97
  #
92
98
  # This feature is only available for users who have Retail Search enabled.
93
- # Please enable Retail Search on Cloud Console before using this feature.
99
+ # Enable Retail Search on Cloud Console before using this feature.
94
100
  #
95
101
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
96
102
  # Defaults to `:v2`.
97
- # @return [CompletionService::Client] A client object for the specified version.
103
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
104
+ # @return [::Object] A client object for the specified version.
98
105
  #
99
- def self.completion_service version: :v2, &block
106
+ def self.completion_service version: :v2, transport: :grpc, &block
100
107
  require "google/cloud/retail/#{version.to_s.downcase}"
101
108
 
102
109
  package_name = Google::Cloud::Retail
103
110
  .constants
104
111
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
105
112
  .first
106
- package_module = Google::Cloud::Retail.const_get package_name
107
- package_module.const_get(:CompletionService).const_get(:Client).new(&block)
113
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:CompletionService)
114
+ service_module = service_module.const_get(:Rest) if transport == :rest
115
+ service_module.const_get(:Client).new(&block)
108
116
  end
109
117
 
110
118
  ##
111
119
  # Create a new client object for ControlService.
112
120
  #
113
121
  # By default, this returns an instance of
114
- # [Google::Cloud::Retail::V2::ControlService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/ControlService/Client.html)
115
- # for version V2 of the API.
116
- # However, you can specify specify a different API version by passing it in the
122
+ # [Google::Cloud::Retail::V2::ControlService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ControlService-Client)
123
+ # for a gRPC client for version V2 of the API.
124
+ # However, you can specify a different API version by passing it in the
117
125
  # `version` parameter. If the ControlService service is
118
126
  # supported by that API version, and the corresponding gem is available, the
119
127
  # appropriate versioned client will be returned.
128
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
129
+ # the `transport` parameter.
120
130
  #
121
131
  # ## About ControlService
122
132
  #
@@ -124,29 +134,78 @@ module Google
124
134
  #
125
135
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
126
136
  # Defaults to `:v2`.
127
- # @return [ControlService::Client] A client object for the specified version.
137
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
138
+ # @return [::Object] A client object for the specified version.
128
139
  #
129
- def self.control_service version: :v2, &block
140
+ def self.control_service version: :v2, transport: :grpc, &block
130
141
  require "google/cloud/retail/#{version.to_s.downcase}"
131
142
 
132
143
  package_name = Google::Cloud::Retail
133
144
  .constants
134
145
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
135
146
  .first
136
- package_module = Google::Cloud::Retail.const_get package_name
137
- package_module.const_get(:ControlService).const_get(:Client).new(&block)
147
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ControlService)
148
+ service_module = service_module.const_get(:Rest) if transport == :rest
149
+ service_module.const_get(:Client).new(&block)
150
+ end
151
+
152
+ ##
153
+ # Create a new client object for ModelService.
154
+ #
155
+ # By default, this returns an instance of
156
+ # [Google::Cloud::Retail::V2::ModelService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ModelService-Client)
157
+ # for a gRPC client for version V2 of the API.
158
+ # However, you can specify a different API version by passing it in the
159
+ # `version` parameter. If the ModelService service is
160
+ # supported by that API version, and the corresponding gem is available, the
161
+ # appropriate versioned client will be returned.
162
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
163
+ # the `transport` parameter.
164
+ #
165
+ # ## About ModelService
166
+ #
167
+ # Service for performing CRUD operations on models.
168
+ # Recommendation models contain all the metadata necessary to generate a set of
169
+ # models for the `Predict()` API. A model is queried
170
+ # indirectly via a ServingConfig, which associates a model with a
171
+ # given Placement (e.g. Frequently Bought Together on Home Page).
172
+ #
173
+ # This service allows you to do the following:
174
+ #
175
+ # * Initiate training of a model.
176
+ # * Pause training of an existing model.
177
+ # * List all the available models along with their metadata.
178
+ # * Control their tuning schedule.
179
+ #
180
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
181
+ # Defaults to `:v2`.
182
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
183
+ # @return [::Object] A client object for the specified version.
184
+ #
185
+ def self.model_service version: :v2, transport: :grpc, &block
186
+ require "google/cloud/retail/#{version.to_s.downcase}"
187
+
188
+ package_name = Google::Cloud::Retail
189
+ .constants
190
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
191
+ .first
192
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ModelService)
193
+ service_module = service_module.const_get(:Rest) if transport == :rest
194
+ service_module.const_get(:Client).new(&block)
138
195
  end
139
196
 
140
197
  ##
141
198
  # Create a new client object for PredictionService.
142
199
  #
143
200
  # By default, this returns an instance of
144
- # [Google::Cloud::Retail::V2::PredictionService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/PredictionService/Client.html)
145
- # for version V2 of the API.
146
- # However, you can specify specify a different API version by passing it in the
201
+ # [Google::Cloud::Retail::V2::PredictionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-PredictionService-Client)
202
+ # for a gRPC client for version V2 of the API.
203
+ # However, you can specify a different API version by passing it in the
147
204
  # `version` parameter. If the PredictionService service is
148
205
  # supported by that API version, and the corresponding gem is available, the
149
206
  # appropriate versioned client will be returned.
207
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
208
+ # the `transport` parameter.
150
209
  #
151
210
  # ## About PredictionService
152
211
  #
@@ -154,29 +213,33 @@ module Google
154
213
  #
155
214
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
156
215
  # Defaults to `:v2`.
157
- # @return [PredictionService::Client] A client object for the specified version.
216
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
217
+ # @return [::Object] A client object for the specified version.
158
218
  #
159
- def self.prediction_service version: :v2, &block
219
+ def self.prediction_service version: :v2, transport: :grpc, &block
160
220
  require "google/cloud/retail/#{version.to_s.downcase}"
161
221
 
162
222
  package_name = Google::Cloud::Retail
163
223
  .constants
164
224
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
165
225
  .first
166
- package_module = Google::Cloud::Retail.const_get package_name
167
- package_module.const_get(:PredictionService).const_get(:Client).new(&block)
226
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:PredictionService)
227
+ service_module = service_module.const_get(:Rest) if transport == :rest
228
+ service_module.const_get(:Client).new(&block)
168
229
  end
169
230
 
170
231
  ##
171
232
  # Create a new client object for ProductService.
172
233
  #
173
234
  # By default, this returns an instance of
174
- # [Google::Cloud::Retail::V2::ProductService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/ProductService/Client.html)
175
- # for version V2 of the API.
176
- # However, you can specify specify a different API version by passing it in the
235
+ # [Google::Cloud::Retail::V2::ProductService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ProductService-Client)
236
+ # for a gRPC client for version V2 of the API.
237
+ # However, you can specify a different API version by passing it in the
177
238
  # `version` parameter. If the ProductService service is
178
239
  # supported by that API version, and the corresponding gem is available, the
179
240
  # appropriate versioned client will be returned.
241
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
242
+ # the `transport` parameter.
180
243
  #
181
244
  # ## About ProductService
182
245
  #
@@ -185,62 +248,70 @@ module Google
185
248
  #
186
249
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
187
250
  # Defaults to `:v2`.
188
- # @return [ProductService::Client] A client object for the specified version.
251
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
252
+ # @return [::Object] A client object for the specified version.
189
253
  #
190
- def self.product_service version: :v2, &block
254
+ def self.product_service version: :v2, transport: :grpc, &block
191
255
  require "google/cloud/retail/#{version.to_s.downcase}"
192
256
 
193
257
  package_name = Google::Cloud::Retail
194
258
  .constants
195
259
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
196
260
  .first
197
- package_module = Google::Cloud::Retail.const_get package_name
198
- package_module.const_get(:ProductService).const_get(:Client).new(&block)
261
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ProductService)
262
+ service_module = service_module.const_get(:Rest) if transport == :rest
263
+ service_module.const_get(:Client).new(&block)
199
264
  end
200
265
 
201
266
  ##
202
267
  # Create a new client object for SearchService.
203
268
  #
204
269
  # By default, this returns an instance of
205
- # [Google::Cloud::Retail::V2::SearchService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/SearchService/Client.html)
206
- # for version V2 of the API.
207
- # However, you can specify specify a different API version by passing it in the
270
+ # [Google::Cloud::Retail::V2::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client)
271
+ # for a gRPC client for version V2 of the API.
272
+ # However, you can specify a different API version by passing it in the
208
273
  # `version` parameter. If the SearchService service is
209
274
  # supported by that API version, and the corresponding gem is available, the
210
275
  # appropriate versioned client will be returned.
276
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
277
+ # the `transport` parameter.
211
278
  #
212
279
  # ## About SearchService
213
280
  #
214
281
  # Service for search.
215
282
  #
216
283
  # This feature is only available for users who have Retail Search enabled.
217
- # Please enable Retail Search on Cloud Console before using this feature.
284
+ # Enable Retail Search on Cloud Console before using this feature.
218
285
  #
219
286
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
220
287
  # Defaults to `:v2`.
221
- # @return [SearchService::Client] A client object for the specified version.
288
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
289
+ # @return [::Object] A client object for the specified version.
222
290
  #
223
- def self.search_service version: :v2, &block
291
+ def self.search_service version: :v2, transport: :grpc, &block
224
292
  require "google/cloud/retail/#{version.to_s.downcase}"
225
293
 
226
294
  package_name = Google::Cloud::Retail
227
295
  .constants
228
296
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
229
297
  .first
230
- package_module = Google::Cloud::Retail.const_get package_name
231
- package_module.const_get(:SearchService).const_get(:Client).new(&block)
298
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:SearchService)
299
+ service_module = service_module.const_get(:Rest) if transport == :rest
300
+ service_module.const_get(:Client).new(&block)
232
301
  end
233
302
 
234
303
  ##
235
304
  # Create a new client object for ServingConfigService.
236
305
  #
237
306
  # By default, this returns an instance of
238
- # [Google::Cloud::Retail::V2::ServingConfigService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/ServingConfigService/Client.html)
239
- # for version V2 of the API.
240
- # However, you can specify specify a different API version by passing it in the
307
+ # [Google::Cloud::Retail::V2::ServingConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ServingConfigService-Client)
308
+ # for a gRPC client for version V2 of the API.
309
+ # However, you can specify a different API version by passing it in the
241
310
  # `version` parameter. If the ServingConfigService service is
242
311
  # supported by that API version, and the corresponding gem is available, the
243
312
  # appropriate versioned client will be returned.
313
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
314
+ # the `transport` parameter.
244
315
  #
245
316
  # ## About ServingConfigService
246
317
  #
@@ -248,29 +319,33 @@ module Google
248
319
  #
249
320
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
250
321
  # Defaults to `:v2`.
251
- # @return [ServingConfigService::Client] A client object for the specified version.
322
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
323
+ # @return [::Object] A client object for the specified version.
252
324
  #
253
- def self.serving_config_service version: :v2, &block
325
+ def self.serving_config_service version: :v2, transport: :grpc, &block
254
326
  require "google/cloud/retail/#{version.to_s.downcase}"
255
327
 
256
328
  package_name = Google::Cloud::Retail
257
329
  .constants
258
330
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
259
331
  .first
260
- package_module = Google::Cloud::Retail.const_get package_name
261
- package_module.const_get(:ServingConfigService).const_get(:Client).new(&block)
332
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ServingConfigService)
333
+ service_module = service_module.const_get(:Rest) if transport == :rest
334
+ service_module.const_get(:Client).new(&block)
262
335
  end
263
336
 
264
337
  ##
265
338
  # Create a new client object for UserEventService.
266
339
  #
267
340
  # By default, this returns an instance of
268
- # [Google::Cloud::Retail::V2::UserEventService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/UserEventService/Client.html)
269
- # for version V2 of the API.
270
- # However, you can specify specify a different API version by passing it in the
341
+ # [Google::Cloud::Retail::V2::UserEventService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-UserEventService-Client)
342
+ # for a gRPC client for version V2 of the API.
343
+ # However, you can specify a different API version by passing it in the
271
344
  # `version` parameter. If the UserEventService service is
272
345
  # supported by that API version, and the corresponding gem is available, the
273
346
  # appropriate versioned client will be returned.
347
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
348
+ # the `transport` parameter.
274
349
  #
275
350
  # ## About UserEventService
276
351
  #
@@ -278,17 +353,19 @@ module Google
278
353
  #
279
354
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
280
355
  # Defaults to `:v2`.
281
- # @return [UserEventService::Client] A client object for the specified version.
356
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
357
+ # @return [::Object] A client object for the specified version.
282
358
  #
283
- def self.user_event_service version: :v2, &block
359
+ def self.user_event_service version: :v2, transport: :grpc, &block
284
360
  require "google/cloud/retail/#{version.to_s.downcase}"
285
361
 
286
362
  package_name = Google::Cloud::Retail
287
363
  .constants
288
364
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
289
365
  .first
290
- package_module = Google::Cloud::Retail.const_get package_name
291
- package_module.const_get(:UserEventService).const_get(:Client).new(&block)
366
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:UserEventService)
367
+ service_module = service_module.const_get(:Rest) if transport == :rest
368
+ service_module.const_get(:Client).new(&block)
292
369
  end
293
370
 
294
371
  ##
@@ -308,7 +385,7 @@ module Google
308
385
  # * `timeout` (*type:* `Numeric`) -
309
386
  # Default timeout in seconds.
310
387
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
311
- # Additional gRPC headers to be sent with the call.
388
+ # Additional headers to be sent with the call.
312
389
  # * `retry_policy` (*type:* `Hash`) -
313
390
  # The retry policy. The value is a hash with the following keys:
314
391
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-retail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.6.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: 2022-09-03 00:00:00.000000000 Z
11
+ date: 2023-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.11'
33
+ version: '0.15'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.11'
43
+ version: '0.15'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.3.14
193
+ rubygems_version: 3.4.2
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: API Client library for the Retail API