google-apis-recommendationengine_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,927 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module RecommendationengineV1beta1
23
+ # Recommendations AI
24
+ #
25
+ # Recommendations AI service enables customers to build end-to-end personalized
26
+ # recommendation systems without requiring a high level of expertise in machine
27
+ # learning, recommendation system, or Google Cloud.
28
+ #
29
+ # @example
30
+ # require 'google/apis/recommendationengine_v1beta1'
31
+ #
32
+ # Recommendationengine = Google::Apis::RecommendationengineV1beta1 # Alias the module
33
+ # service = Recommendationengine::RecommendationsAIService.new
34
+ #
35
+ # @see https://cloud.google.com/recommendations-ai/docs
36
+ class RecommendationsAIService < Google::Apis::Core::BaseService
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super('https://recommendationengine.googleapis.com/', '',
49
+ client_name: 'google-apis-recommendationengine_v1beta1',
50
+ client_version: Google::Apis::RecommendationengineV1beta1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Lists all the catalog configurations associated with the project.
55
+ # @param [String] parent
56
+ # Required. The account resource name with an associated location.
57
+ # @param [Fixnum] page_size
58
+ # Optional. Maximum number of results to return. If unspecified, defaults to 50.
59
+ # Max allowed value is 1000.
60
+ # @param [String] page_token
61
+ # Optional. A page token, received from a previous `ListCatalogs` call. Provide
62
+ # this to retrieve the subsequent page.
63
+ # @param [String] fields
64
+ # Selector specifying which fields to include in a partial response.
65
+ # @param [String] quota_user
66
+ # Available to use for quota purposes for server-side applications. Can be any
67
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
68
+ # @param [Google::Apis::RequestOptions] options
69
+ # Request-specific options
70
+ #
71
+ # @yield [result, err] Result & error if block supplied
72
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogsResponse] parsed result object
73
+ # @yieldparam err [StandardError] error object if request failed
74
+ #
75
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogsResponse]
76
+ #
77
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
80
+ def list_project_location_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
81
+ command = make_simple_command(:get, 'v1beta1/{+parent}/catalogs', options)
82
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogsResponse::Representation
83
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogsResponse
84
+ command.params['parent'] = parent unless parent.nil?
85
+ command.query['pageSize'] = page_size unless page_size.nil?
86
+ command.query['pageToken'] = page_token unless page_token.nil?
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Updates the catalog configuration.
93
+ # @param [String] name
94
+ # The fully qualified resource name of the catalog.
95
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Catalog] google_cloud_recommendationengine_v1beta1_catalog_object
96
+ # @param [String] update_mask
97
+ # Optional. Indicates which fields in the provided 'catalog' to update. If not
98
+ # set, will only update the catalog_item_level_config field. Currently only
99
+ # fields that can be updated are catalog_item_level_config.
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
102
+ # @param [String] quota_user
103
+ # Available to use for quota purposes for server-side applications. Can be any
104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
105
+ # @param [Google::Apis::RequestOptions] options
106
+ # Request-specific options
107
+ #
108
+ # @yield [result, err] Result & error if block supplied
109
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Catalog] parsed result object
110
+ # @yieldparam err [StandardError] error object if request failed
111
+ #
112
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Catalog]
113
+ #
114
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
115
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
116
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
117
+ def patch_project_location_catalog(name, google_cloud_recommendationengine_v1beta1_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
118
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
119
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Catalog::Representation
120
+ command.request_object = google_cloud_recommendationengine_v1beta1_catalog_object
121
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Catalog::Representation
122
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Catalog
123
+ command.params['name'] = name unless name.nil?
124
+ command.query['updateMask'] = update_mask unless update_mask.nil?
125
+ command.query['fields'] = fields unless fields.nil?
126
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
127
+ execute_or_queue_command(command, &block)
128
+ end
129
+
130
+ # Creates a catalog item.
131
+ # @param [String] parent
132
+ # Required. The parent catalog resource name, such as "projects/*/locations/
133
+ # global/catalogs/default_catalog".
134
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem] google_cloud_recommendationengine_v1beta1_catalog_item_object
135
+ # @param [String] fields
136
+ # Selector specifying which fields to include in a partial response.
137
+ # @param [String] quota_user
138
+ # Available to use for quota purposes for server-side applications. Can be any
139
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
140
+ # @param [Google::Apis::RequestOptions] options
141
+ # Request-specific options
142
+ #
143
+ # @yield [result, err] Result & error if block supplied
144
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem] parsed result object
145
+ # @yieldparam err [StandardError] error object if request failed
146
+ #
147
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem]
148
+ #
149
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
150
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
151
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
152
+ def create_project_location_catalog_catalog_item(parent, google_cloud_recommendationengine_v1beta1_catalog_item_object = nil, fields: nil, quota_user: nil, options: nil, &block)
153
+ command = make_simple_command(:post, 'v1beta1/{+parent}/catalogItems', options)
154
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem::Representation
155
+ command.request_object = google_cloud_recommendationengine_v1beta1_catalog_item_object
156
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem::Representation
157
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem
158
+ command.params['parent'] = parent unless parent.nil?
159
+ command.query['fields'] = fields unless fields.nil?
160
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
161
+ execute_or_queue_command(command, &block)
162
+ end
163
+
164
+ # Deletes a catalog item.
165
+ # @param [String] name
166
+ # Required. Full resource name of catalog item, such as "projects/*/locations/
167
+ # global/catalogs/default_catalog/catalogItems/some_catalog_item_id".
168
+ # @param [String] fields
169
+ # Selector specifying which fields to include in a partial response.
170
+ # @param [String] quota_user
171
+ # Available to use for quota purposes for server-side applications. Can be any
172
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
173
+ # @param [Google::Apis::RequestOptions] options
174
+ # Request-specific options
175
+ #
176
+ # @yield [result, err] Result & error if block supplied
177
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty] parsed result object
178
+ # @yieldparam err [StandardError] error object if request failed
179
+ #
180
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty]
181
+ #
182
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
183
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
184
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
185
+ def delete_project_location_catalog_catalog_item(name, fields: nil, quota_user: nil, options: nil, &block)
186
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
187
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty::Representation
188
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty
189
+ command.params['name'] = name unless name.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Gets a specific catalog item.
196
+ # @param [String] name
197
+ # Required. Full resource name of catalog item, such as "projects/*/locations/
198
+ # global/catalogs/default_catalog/catalogitems/some_catalog_item_id".
199
+ # @param [String] fields
200
+ # Selector specifying which fields to include in a partial response.
201
+ # @param [String] quota_user
202
+ # Available to use for quota purposes for server-side applications. Can be any
203
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
204
+ # @param [Google::Apis::RequestOptions] options
205
+ # Request-specific options
206
+ #
207
+ # @yield [result, err] Result & error if block supplied
208
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem] parsed result object
209
+ # @yieldparam err [StandardError] error object if request failed
210
+ #
211
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem]
212
+ #
213
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
214
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
215
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
216
+ def get_project_location_catalog_catalog_item(name, fields: nil, quota_user: nil, options: nil, &block)
217
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
218
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem::Representation
219
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem
220
+ command.params['name'] = name unless name.nil?
221
+ command.query['fields'] = fields unless fields.nil?
222
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
223
+ execute_or_queue_command(command, &block)
224
+ end
225
+
226
+ # Bulk import of multiple catalog items. Request processing may be synchronous.
227
+ # No partial updating supported. Non-existing items will be created. Operation.
228
+ # response is of type ImportResponse. Note that it is possible for a subset of
229
+ # the items to be successfully updated.
230
+ # @param [String] parent
231
+ # Required. "projects/1234/locations/global/catalogs/default_catalog" If no
232
+ # updateMask is specified, requires catalogItems.create permission. If
233
+ # updateMask is specified, requires catalogItems.update permission.
234
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest] google_cloud_recommendationengine_v1beta1_import_catalog_items_request_object
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # @param [Google::Apis::RequestOptions] options
241
+ # Request-specific options
242
+ #
243
+ # @yield [result, err] Result & error if block supplied
244
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation] parsed result object
245
+ # @yieldparam err [StandardError] error object if request failed
246
+ #
247
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation]
248
+ #
249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
252
+ def import_project_location_catalog_catalog_item(parent, google_cloud_recommendationengine_v1beta1_import_catalog_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
253
+ command = make_simple_command(:post, 'v1beta1/{+parent}/catalogItems:import', options)
254
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest::Representation
255
+ command.request_object = google_cloud_recommendationengine_v1beta1_import_catalog_items_request_object
256
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation::Representation
257
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation
258
+ command.params['parent'] = parent unless parent.nil?
259
+ command.query['fields'] = fields unless fields.nil?
260
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
261
+ execute_or_queue_command(command, &block)
262
+ end
263
+
264
+ # Gets a list of catalog items.
265
+ # @param [String] parent
266
+ # Required. The parent catalog resource name, such as "projects/*/locations/
267
+ # global/catalogs/default_catalog".
268
+ # @param [String] filter
269
+ # Optional. A filter to apply on the list results.
270
+ # @param [Fixnum] page_size
271
+ # Optional. Maximum number of results to return per page. If zero, the service
272
+ # will choose a reasonable default.
273
+ # @param [String] page_token
274
+ # Optional. The previous ListCatalogItemsResponse.next_page_token.
275
+ # @param [String] fields
276
+ # Selector specifying which fields to include in a partial response.
277
+ # @param [String] quota_user
278
+ # Available to use for quota purposes for server-side applications. Can be any
279
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
280
+ # @param [Google::Apis::RequestOptions] options
281
+ # Request-specific options
282
+ #
283
+ # @yield [result, err] Result & error if block supplied
284
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse] parsed result object
285
+ # @yieldparam err [StandardError] error object if request failed
286
+ #
287
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse]
288
+ #
289
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
290
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
291
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
292
+ def list_project_location_catalog_catalog_items(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
293
+ command = make_simple_command(:get, 'v1beta1/{+parent}/catalogItems', options)
294
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse::Representation
295
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse
296
+ command.params['parent'] = parent unless parent.nil?
297
+ command.query['filter'] = filter unless filter.nil?
298
+ command.query['pageSize'] = page_size unless page_size.nil?
299
+ command.query['pageToken'] = page_token unless page_token.nil?
300
+ command.query['fields'] = fields unless fields.nil?
301
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
302
+ execute_or_queue_command(command, &block)
303
+ end
304
+
305
+ # Updates a catalog item. Partial updating is supported. Non-existing items will
306
+ # be created.
307
+ # @param [String] name
308
+ # Required. Full resource name of catalog item, such as "projects/*/locations/
309
+ # global/catalogs/default_catalog/catalogItems/some_catalog_item_id".
310
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem] google_cloud_recommendationengine_v1beta1_catalog_item_object
311
+ # @param [String] update_mask
312
+ # Optional. Indicates which fields in the provided 'item' to update. If not set,
313
+ # will by default update all fields.
314
+ # @param [String] fields
315
+ # Selector specifying which fields to include in a partial response.
316
+ # @param [String] quota_user
317
+ # Available to use for quota purposes for server-side applications. Can be any
318
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
319
+ # @param [Google::Apis::RequestOptions] options
320
+ # Request-specific options
321
+ #
322
+ # @yield [result, err] Result & error if block supplied
323
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem] parsed result object
324
+ # @yieldparam err [StandardError] error object if request failed
325
+ #
326
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem]
327
+ #
328
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
329
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
330
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
331
+ def patch_project_location_catalog_catalog_item(name, google_cloud_recommendationengine_v1beta1_catalog_item_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
332
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
333
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem::Representation
334
+ command.request_object = google_cloud_recommendationengine_v1beta1_catalog_item_object
335
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem::Representation
336
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItem
337
+ command.params['name'] = name unless name.nil?
338
+ command.query['updateMask'] = update_mask unless update_mask.nil?
339
+ command.query['fields'] = fields unless fields.nil?
340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
341
+ execute_or_queue_command(command, &block)
342
+ end
343
+
344
+ # Gets the latest state of a long-running operation. Clients can use this method
345
+ # to poll the operation result at intervals as recommended by the API service.
346
+ # @param [String] name
347
+ # The name of the operation resource.
348
+ # @param [String] fields
349
+ # Selector specifying which fields to include in a partial response.
350
+ # @param [String] quota_user
351
+ # Available to use for quota purposes for server-side applications. Can be any
352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
353
+ # @param [Google::Apis::RequestOptions] options
354
+ # Request-specific options
355
+ #
356
+ # @yield [result, err] Result & error if block supplied
357
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation] parsed result object
358
+ # @yieldparam err [StandardError] error object if request failed
359
+ #
360
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation]
361
+ #
362
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
363
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
364
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
365
+ def get_project_location_catalog_event_store_operation(name, fields: nil, quota_user: nil, options: nil, &block)
366
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
367
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation::Representation
368
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation
369
+ command.params['name'] = name unless name.nil?
370
+ command.query['fields'] = fields unless fields.nil?
371
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
372
+ execute_or_queue_command(command, &block)
373
+ end
374
+
375
+ # Lists operations that match the specified filter in the request. If the server
376
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
377
+ # binding allows API services to override the binding to use different resource
378
+ # name schemes, such as `users/*/operations`. To override the binding, API
379
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
380
+ # service configuration. For backwards compatibility, the default name includes
381
+ # the operations collection id, however overriding users must ensure the name
382
+ # binding is the parent resource, without the operations collection id.
383
+ # @param [String] name
384
+ # The name of the operation's parent resource.
385
+ # @param [String] filter
386
+ # The standard list filter.
387
+ # @param [Fixnum] page_size
388
+ # The standard list page size.
389
+ # @param [String] page_token
390
+ # The standard list page token.
391
+ # @param [String] fields
392
+ # Selector specifying which fields to include in a partial response.
393
+ # @param [String] quota_user
394
+ # Available to use for quota purposes for server-side applications. Can be any
395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
396
+ # @param [Google::Apis::RequestOptions] options
397
+ # Request-specific options
398
+ #
399
+ # @yield [result, err] Result & error if block supplied
400
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse] parsed result object
401
+ # @yieldparam err [StandardError] error object if request failed
402
+ #
403
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse]
404
+ #
405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
408
+ def list_project_location_catalog_event_store_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
409
+ command = make_simple_command(:get, 'v1beta1/{+name}/operations', options)
410
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse::Representation
411
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse
412
+ command.params['name'] = name unless name.nil?
413
+ command.query['filter'] = filter unless filter.nil?
414
+ command.query['pageSize'] = page_size unless page_size.nil?
415
+ command.query['pageToken'] = page_token unless page_token.nil?
416
+ command.query['fields'] = fields unless fields.nil?
417
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
418
+ execute_or_queue_command(command, &block)
419
+ end
420
+
421
+ # Makes a recommendation prediction. If using API Key based authentication, the
422
+ # API Key must be registered using the PredictionApiKeyRegistry service. [Learn
423
+ # more](https://cloud.google.com/recommendations-ai/docs/setting-up#register-key)
424
+ # .
425
+ # @param [String] name
426
+ # Required. Full resource name of the format: `name=projects/*/locations/global/
427
+ # catalogs/default_catalog/eventStores/default_event_store/placements/*` The id
428
+ # of the recommendation engine placement. This id is used to identify the set of
429
+ # models that will be used to make the prediction. We currently support three
430
+ # placements with the following IDs by default: * `shopping_cart`: Predicts
431
+ # items frequently bought together with one or more catalog items in the same
432
+ # shopping session. Commonly displayed after `add-to-cart` events, on product
433
+ # detail pages, or on the shopping cart page. * `home_page`: Predicts the next
434
+ # product that a user will most likely engage with or purchase based on the
435
+ # shopping or viewing history of the specified `userId` or `visitorId`. For
436
+ # example - Recommendations for you. * `product_detail`: Predicts the next
437
+ # product that a user will most likely engage with or purchase. The prediction
438
+ # is based on the shopping or viewing history of the specified `userId` or `
439
+ # visitorId` and its relevance to a specified `CatalogItem`. Typically used on
440
+ # product detail pages. For example - More items like this. * `
441
+ # recently_viewed_default`: Returns up to 75 items recently viewed by the
442
+ # specified `userId` or `visitorId`, most recent ones first. Returns nothing if
443
+ # neither of them has viewed any items yet. For example - Recently viewed. The
444
+ # full list of available placements can be seen at https://console.cloud.google.
445
+ # com/recommendation/datafeeds/default_catalog/dashboard
446
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictRequest] google_cloud_recommendationengine_v1beta1_predict_request_object
447
+ # @param [String] fields
448
+ # Selector specifying which fields to include in a partial response.
449
+ # @param [String] quota_user
450
+ # Available to use for quota purposes for server-side applications. Can be any
451
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
452
+ # @param [Google::Apis::RequestOptions] options
453
+ # Request-specific options
454
+ #
455
+ # @yield [result, err] Result & error if block supplied
456
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictResponse] parsed result object
457
+ # @yieldparam err [StandardError] error object if request failed
458
+ #
459
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictResponse]
460
+ #
461
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
462
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
463
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
464
+ def predict_project_location_catalog_event_store_placement(name, google_cloud_recommendationengine_v1beta1_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
465
+ command = make_simple_command(:post, 'v1beta1/{+name}:predict', options)
466
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictRequest::Representation
467
+ command.request_object = google_cloud_recommendationengine_v1beta1_predict_request_object
468
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictResponse::Representation
469
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictResponse
470
+ command.params['name'] = name unless name.nil?
471
+ command.query['fields'] = fields unless fields.nil?
472
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
473
+ execute_or_queue_command(command, &block)
474
+ end
475
+
476
+ # Register an API key for use with predict method.
477
+ # @param [String] parent
478
+ # Required. The parent resource path. "projects/*/locations/global/catalogs/
479
+ # default_catalog/eventStores/default_event_store".
480
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest] google_cloud_recommendationengine_v1beta1_create_prediction_api_key_registration_request_object
481
+ # @param [String] fields
482
+ # Selector specifying which fields to include in a partial response.
483
+ # @param [String] quota_user
484
+ # Available to use for quota purposes for server-side applications. Can be any
485
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
486
+ # @param [Google::Apis::RequestOptions] options
487
+ # Request-specific options
488
+ #
489
+ # @yield [result, err] Result & error if block supplied
490
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration] parsed result object
491
+ # @yieldparam err [StandardError] error object if request failed
492
+ #
493
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration]
494
+ #
495
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
496
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
497
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
498
+ def create_project_location_catalog_event_store_prediction_api_key_registration(parent, google_cloud_recommendationengine_v1beta1_create_prediction_api_key_registration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
499
+ command = make_simple_command(:post, 'v1beta1/{+parent}/predictionApiKeyRegistrations', options)
500
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest::Representation
501
+ command.request_object = google_cloud_recommendationengine_v1beta1_create_prediction_api_key_registration_request_object
502
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration::Representation
503
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration
504
+ command.params['parent'] = parent unless parent.nil?
505
+ command.query['fields'] = fields unless fields.nil?
506
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
507
+ execute_or_queue_command(command, &block)
508
+ end
509
+
510
+ # Unregister an apiKey from using for predict method.
511
+ # @param [String] name
512
+ # Required. The API key to unregister including full resource path. "projects/*/
513
+ # locations/global/catalogs/default_catalog/eventStores/default_event_store/
514
+ # predictionApiKeyRegistrations/"
515
+ # @param [String] fields
516
+ # Selector specifying which fields to include in a partial response.
517
+ # @param [String] quota_user
518
+ # Available to use for quota purposes for server-side applications. Can be any
519
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
520
+ # @param [Google::Apis::RequestOptions] options
521
+ # Request-specific options
522
+ #
523
+ # @yield [result, err] Result & error if block supplied
524
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty] parsed result object
525
+ # @yieldparam err [StandardError] error object if request failed
526
+ #
527
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty]
528
+ #
529
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
530
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
531
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
532
+ def delete_project_location_catalog_event_store_prediction_api_key_registration(name, fields: nil, quota_user: nil, options: nil, &block)
533
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
534
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty::Representation
535
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleProtobufEmpty
536
+ command.params['name'] = name unless name.nil?
537
+ command.query['fields'] = fields unless fields.nil?
538
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
539
+ execute_or_queue_command(command, &block)
540
+ end
541
+
542
+ # List the registered apiKeys for use with predict method.
543
+ # @param [String] parent
544
+ # Required. The parent placement resource name such as "projects/1234/locations/
545
+ # global/catalogs/default_catalog/eventStores/default_event_store"
546
+ # @param [Fixnum] page_size
547
+ # Optional. Maximum number of results to return per page. If unset, the service
548
+ # will choose a reasonable default.
549
+ # @param [String] page_token
550
+ # Optional. The previous `ListPredictionApiKeyRegistration.nextPageToken`.
551
+ # @param [String] fields
552
+ # Selector specifying which fields to include in a partial response.
553
+ # @param [String] quota_user
554
+ # Available to use for quota purposes for server-side applications. Can be any
555
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
556
+ # @param [Google::Apis::RequestOptions] options
557
+ # Request-specific options
558
+ #
559
+ # @yield [result, err] Result & error if block supplied
560
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse] parsed result object
561
+ # @yieldparam err [StandardError] error object if request failed
562
+ #
563
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse]
564
+ #
565
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
566
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
567
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
568
+ def list_project_location_catalog_event_store_prediction_api_key_registrations(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
569
+ command = make_simple_command(:get, 'v1beta1/{+parent}/predictionApiKeyRegistrations', options)
570
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse::Representation
571
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse
572
+ command.params['parent'] = parent unless parent.nil?
573
+ command.query['pageSize'] = page_size unless page_size.nil?
574
+ command.query['pageToken'] = page_token unless page_token.nil?
575
+ command.query['fields'] = fields unless fields.nil?
576
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
577
+ execute_or_queue_command(command, &block)
578
+ end
579
+
580
+ # Writes a single user event from the browser. This uses a GET request to due to
581
+ # browser restriction of POST-ing to a 3rd party domain. This method is used
582
+ # only by the Recommendations AI JavaScript pixel. Users should not call this
583
+ # method directly.
584
+ # @param [String] parent
585
+ # Required. The parent eventStore name, such as "projects/1234/locations/global/
586
+ # catalogs/default_catalog/eventStores/default_event_store".
587
+ # @param [Fixnum] ets
588
+ # Optional. The event timestamp in milliseconds. This prevents browser caching
589
+ # of otherwise identical get requests. The name is abbreviated to reduce the
590
+ # payload bytes.
591
+ # @param [String] uri
592
+ # Optional. The url including cgi-parameters but excluding the hash fragment.
593
+ # The URL must be truncated to 1.5K bytes to conservatively be under the 2K
594
+ # bytes. This is often more useful than the referer url, because many browsers
595
+ # only send the domain for 3rd party requests.
596
+ # @param [String] user_event
597
+ # Required. URL encoded UserEvent proto.
598
+ # @param [String] fields
599
+ # Selector specifying which fields to include in a partial response.
600
+ # @param [String] quota_user
601
+ # Available to use for quota purposes for server-side applications. Can be any
602
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
603
+ # @param [Google::Apis::RequestOptions] options
604
+ # Request-specific options
605
+ #
606
+ # @yield [result, err] Result & error if block supplied
607
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleApiHttpBody] parsed result object
608
+ # @yieldparam err [StandardError] error object if request failed
609
+ #
610
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleApiHttpBody]
611
+ #
612
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
613
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
614
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
615
+ def collect_project_location_catalog_event_store_user_event(parent, ets: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil, &block)
616
+ command = make_simple_command(:get, 'v1beta1/{+parent}/userEvents:collect', options)
617
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleApiHttpBody::Representation
618
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleApiHttpBody
619
+ command.params['parent'] = parent unless parent.nil?
620
+ command.query['ets'] = ets unless ets.nil?
621
+ command.query['uri'] = uri unless uri.nil?
622
+ command.query['userEvent'] = user_event unless user_event.nil?
623
+ command.query['fields'] = fields unless fields.nil?
624
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
625
+ execute_or_queue_command(command, &block)
626
+ end
627
+
628
+ # Bulk import of User events. Request processing might be synchronous. Events
629
+ # that already exist are skipped. Use this method for backfilling historical
630
+ # user events. Operation.response is of type ImportResponse. Note that it is
631
+ # possible for a subset of the items to be successfully inserted. Operation.
632
+ # metadata is of type ImportMetadata.
633
+ # @param [String] parent
634
+ # Required. "projects/1234/locations/global/catalogs/default_catalog/eventStores/
635
+ # default_event_store"
636
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest] google_cloud_recommendationengine_v1beta1_import_user_events_request_object
637
+ # @param [String] fields
638
+ # Selector specifying which fields to include in a partial response.
639
+ # @param [String] quota_user
640
+ # Available to use for quota purposes for server-side applications. Can be any
641
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
642
+ # @param [Google::Apis::RequestOptions] options
643
+ # Request-specific options
644
+ #
645
+ # @yield [result, err] Result & error if block supplied
646
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation] parsed result object
647
+ # @yieldparam err [StandardError] error object if request failed
648
+ #
649
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation]
650
+ #
651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
654
+ def import_project_location_catalog_event_store_user_event(parent, google_cloud_recommendationengine_v1beta1_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
655
+ command = make_simple_command(:post, 'v1beta1/{+parent}/userEvents:import', options)
656
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest::Representation
657
+ command.request_object = google_cloud_recommendationengine_v1beta1_import_user_events_request_object
658
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation::Representation
659
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation
660
+ command.params['parent'] = parent unless parent.nil?
661
+ command.query['fields'] = fields unless fields.nil?
662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
663
+ execute_or_queue_command(command, &block)
664
+ end
665
+
666
+ # Gets a list of user events within a time range, with potential filtering. The
667
+ # method does not list unjoined user events. Unjoined user event definition:
668
+ # when a user event is ingested from Recommendations AI User Event APIs, the
669
+ # catalog item included in the user event is connected with the current catalog.
670
+ # If a catalog item of the ingested event is not in the current catalog, it
671
+ # could lead to degraded model quality. This is called an unjoined event.
672
+ # @param [String] parent
673
+ # Required. The parent eventStore resource name, such as "projects/*/locations/*/
674
+ # catalogs/default_catalog/eventStores/default_event_store".
675
+ # @param [String] filter
676
+ # Optional. Filtering expression to specify restrictions over returned events.
677
+ # This is a sequence of terms, where each term applies some kind of a
678
+ # restriction to the returned user events. Use this expression to restrict
679
+ # results to a specific time range, or filter events by eventType. eg: eventTime
680
+ # > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems eventTime<"2012-04-
681
+ # 23T18:25:43.511Z" eventType=search We expect only 3 types of fields: *
682
+ # eventTime: this can be specified a maximum of 2 times, once with a less than
683
+ # operator and once with a greater than operator. The eventTime restrict should
684
+ # result in one contiguous valid eventTime range. * eventType: only 1 eventType
685
+ # restriction can be specified. * eventsMissingCatalogItems: specififying this
686
+ # will restrict results to events for which catalog items were not found in the
687
+ # catalog. The default behavior is to return only those events for which catalog
688
+ # items were found. Some examples of valid filters expressions: * Example 1:
689
+ # eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" *
690
+ # Example 2: eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-
691
+ # view * Example 3: eventsMissingCatalogItems eventType = search eventTime < "
692
+ # 2018-04-23T18:30:43.511Z" * Example 4: eventTime > "2012-04-23T18:25:43.511Z" *
693
+ # Example 5: eventType = search * Example 6: eventsMissingCatalogItems
694
+ # @param [Fixnum] page_size
695
+ # Optional. Maximum number of results to return per page. If zero, the service
696
+ # will choose a reasonable default.
697
+ # @param [String] page_token
698
+ # Optional. The previous ListUserEventsResponse.next_page_token.
699
+ # @param [String] fields
700
+ # Selector specifying which fields to include in a partial response.
701
+ # @param [String] quota_user
702
+ # Available to use for quota purposes for server-side applications. Can be any
703
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
704
+ # @param [Google::Apis::RequestOptions] options
705
+ # Request-specific options
706
+ #
707
+ # @yield [result, err] Result & error if block supplied
708
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListUserEventsResponse] parsed result object
709
+ # @yieldparam err [StandardError] error object if request failed
710
+ #
711
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListUserEventsResponse]
712
+ #
713
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
714
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
715
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
716
+ def list_project_location_catalog_event_store_user_events(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
717
+ command = make_simple_command(:get, 'v1beta1/{+parent}/userEvents', options)
718
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListUserEventsResponse::Representation
719
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ListUserEventsResponse
720
+ command.params['parent'] = parent unless parent.nil?
721
+ command.query['filter'] = filter unless filter.nil?
722
+ command.query['pageSize'] = page_size unless page_size.nil?
723
+ command.query['pageToken'] = page_token unless page_token.nil?
724
+ command.query['fields'] = fields unless fields.nil?
725
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
726
+ execute_or_queue_command(command, &block)
727
+ end
728
+
729
+ # Deletes permanently all user events specified by the filter provided.
730
+ # Depending on the number of events specified by the filter, this operation
731
+ # could take hours or days to complete. To test a filter, use the list command
732
+ # first.
733
+ # @param [String] parent
734
+ # Required. The resource name of the event_store under which the events are
735
+ # created. The format is "projects/$`projectId`/locations/global/catalogs/$`
736
+ # catalogId`/eventStores/$`eventStoreId`"
737
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest] google_cloud_recommendationengine_v1beta1_purge_user_events_request_object
738
+ # @param [String] fields
739
+ # Selector specifying which fields to include in a partial response.
740
+ # @param [String] quota_user
741
+ # Available to use for quota purposes for server-side applications. Can be any
742
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
743
+ # @param [Google::Apis::RequestOptions] options
744
+ # Request-specific options
745
+ #
746
+ # @yield [result, err] Result & error if block supplied
747
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation] parsed result object
748
+ # @yieldparam err [StandardError] error object if request failed
749
+ #
750
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation]
751
+ #
752
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
753
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
754
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
755
+ def purge_project_location_catalog_event_store_user_event(parent, google_cloud_recommendationengine_v1beta1_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
756
+ command = make_simple_command(:post, 'v1beta1/{+parent}/userEvents:purge', options)
757
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest::Representation
758
+ command.request_object = google_cloud_recommendationengine_v1beta1_purge_user_events_request_object
759
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation::Representation
760
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation
761
+ command.params['parent'] = parent unless parent.nil?
762
+ command.query['fields'] = fields unless fields.nil?
763
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
764
+ execute_or_queue_command(command, &block)
765
+ end
766
+
767
+ # Triggers a user event rejoin operation with latest catalog data. Events will
768
+ # not be annotated with detailed catalog information if catalog item is missing
769
+ # at the time the user event is ingested, and these events are stored as
770
+ # unjoined events with a limited usage on training and serving. This API can be
771
+ # used to trigger a 'join' operation on specified events with latest version of
772
+ # catalog items. It can also be used to correct events joined with wrong catalog
773
+ # items.
774
+ # @param [String] parent
775
+ # Required. Full resource name of user event, such as "projects/*/locations/*/
776
+ # catalogs/default_catalog/eventStores/default_event_store".
777
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest] google_cloud_recommendationengine_v1beta1_rejoin_user_events_request_object
778
+ # @param [String] fields
779
+ # Selector specifying which fields to include in a partial response.
780
+ # @param [String] quota_user
781
+ # Available to use for quota purposes for server-side applications. Can be any
782
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
783
+ # @param [Google::Apis::RequestOptions] options
784
+ # Request-specific options
785
+ #
786
+ # @yield [result, err] Result & error if block supplied
787
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation] parsed result object
788
+ # @yieldparam err [StandardError] error object if request failed
789
+ #
790
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation]
791
+ #
792
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
793
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
794
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
795
+ def rejoin_project_location_catalog_event_store_user_event(parent, google_cloud_recommendationengine_v1beta1_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
796
+ command = make_simple_command(:post, 'v1beta1/{+parent}/userEvents:rejoin', options)
797
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest::Representation
798
+ command.request_object = google_cloud_recommendationengine_v1beta1_rejoin_user_events_request_object
799
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation::Representation
800
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation
801
+ command.params['parent'] = parent unless parent.nil?
802
+ command.query['fields'] = fields unless fields.nil?
803
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
804
+ execute_or_queue_command(command, &block)
805
+ end
806
+
807
+ # Writes a single user event.
808
+ # @param [String] parent
809
+ # Required. The parent eventStore resource name, such as "projects/1234/
810
+ # locations/global/catalogs/default_catalog/eventStores/default_event_store".
811
+ # @param [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1UserEvent] google_cloud_recommendationengine_v1beta1_user_event_object
812
+ # @param [String] fields
813
+ # Selector specifying which fields to include in a partial response.
814
+ # @param [String] quota_user
815
+ # Available to use for quota purposes for server-side applications. Can be any
816
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
817
+ # @param [Google::Apis::RequestOptions] options
818
+ # Request-specific options
819
+ #
820
+ # @yield [result, err] Result & error if block supplied
821
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1UserEvent] parsed result object
822
+ # @yieldparam err [StandardError] error object if request failed
823
+ #
824
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1UserEvent]
825
+ #
826
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
827
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
828
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
829
+ def write_project_location_catalog_event_store_user_event(parent, google_cloud_recommendationengine_v1beta1_user_event_object = nil, fields: nil, quota_user: nil, options: nil, &block)
830
+ command = make_simple_command(:post, 'v1beta1/{+parent}/userEvents:write', options)
831
+ command.request_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1UserEvent::Representation
832
+ command.request_object = google_cloud_recommendationengine_v1beta1_user_event_object
833
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1UserEvent::Representation
834
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1UserEvent
835
+ command.params['parent'] = parent unless parent.nil?
836
+ command.query['fields'] = fields unless fields.nil?
837
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
838
+ execute_or_queue_command(command, &block)
839
+ end
840
+
841
+ # Gets the latest state of a long-running operation. Clients can use this method
842
+ # to poll the operation result at intervals as recommended by the API service.
843
+ # @param [String] name
844
+ # The name of the operation resource.
845
+ # @param [String] fields
846
+ # Selector specifying which fields to include in a partial response.
847
+ # @param [String] quota_user
848
+ # Available to use for quota purposes for server-side applications. Can be any
849
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
850
+ # @param [Google::Apis::RequestOptions] options
851
+ # Request-specific options
852
+ #
853
+ # @yield [result, err] Result & error if block supplied
854
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation] parsed result object
855
+ # @yieldparam err [StandardError] error object if request failed
856
+ #
857
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation]
858
+ #
859
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
860
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
861
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
862
+ def get_project_location_catalog_operation(name, fields: nil, quota_user: nil, options: nil, &block)
863
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
864
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation::Representation
865
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningOperation
866
+ command.params['name'] = name unless name.nil?
867
+ command.query['fields'] = fields unless fields.nil?
868
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
869
+ execute_or_queue_command(command, &block)
870
+ end
871
+
872
+ # Lists operations that match the specified filter in the request. If the server
873
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
874
+ # binding allows API services to override the binding to use different resource
875
+ # name schemes, such as `users/*/operations`. To override the binding, API
876
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
877
+ # service configuration. For backwards compatibility, the default name includes
878
+ # the operations collection id, however overriding users must ensure the name
879
+ # binding is the parent resource, without the operations collection id.
880
+ # @param [String] name
881
+ # The name of the operation's parent resource.
882
+ # @param [String] filter
883
+ # The standard list filter.
884
+ # @param [Fixnum] page_size
885
+ # The standard list page size.
886
+ # @param [String] page_token
887
+ # The standard list page token.
888
+ # @param [String] fields
889
+ # Selector specifying which fields to include in a partial response.
890
+ # @param [String] quota_user
891
+ # Available to use for quota purposes for server-side applications. Can be any
892
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
893
+ # @param [Google::Apis::RequestOptions] options
894
+ # Request-specific options
895
+ #
896
+ # @yield [result, err] Result & error if block supplied
897
+ # @yieldparam result [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse] parsed result object
898
+ # @yieldparam err [StandardError] error object if request failed
899
+ #
900
+ # @return [Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse]
901
+ #
902
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
903
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
904
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
905
+ def list_project_location_catalog_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
906
+ command = make_simple_command(:get, 'v1beta1/{+name}/operations', options)
907
+ command.response_representation = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse::Representation
908
+ command.response_class = Google::Apis::RecommendationengineV1beta1::GoogleLongrunningListOperationsResponse
909
+ command.params['name'] = name unless name.nil?
910
+ command.query['filter'] = filter unless filter.nil?
911
+ command.query['pageSize'] = page_size unless page_size.nil?
912
+ command.query['pageToken'] = page_token unless page_token.nil?
913
+ command.query['fields'] = fields unless fields.nil?
914
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
915
+ execute_or_queue_command(command, &block)
916
+ end
917
+
918
+ protected
919
+
920
+ def apply_command_defaults(command)
921
+ command.query['key'] = key unless key.nil?
922
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
923
+ end
924
+ end
925
+ end
926
+ end
927
+ end