google-apis-retail_v2beta 0.10.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -51,6 +51,113 @@ module Google
51
51
  @batch_path = 'batch'
52
52
  end
53
53
 
54
+ # Completes the specified prefix with keyword suggestions. This feature is only
55
+ # available for users who have Retail Search enabled. Please submit a form [here]
56
+ # (https://cloud.google.com/contact) to contact cloud sales if you are
57
+ # interested in using Retail Search.
58
+ # @param [String] catalog
59
+ # Required. Catalog for which the completion is performed. Full resource name of
60
+ # catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
61
+ # @param [String] dataset
62
+ # Determines which dataset to use for fetching completion. "user-data" will use
63
+ # the imported dataset through CompletionService.ImportCompletionData. "cloud-
64
+ # retail" will use the dataset generated by cloud retail based on user events.
65
+ # If leave empty, it will use the "user-data". Current supported values: * user-
66
+ # data * cloud-retail This option requires additional allowlisting. Before using
67
+ # cloud-retail, contact Cloud Retail support team first.
68
+ # @param [String] device_type
69
+ # The device type context for completion suggestions. It is useful to apply
70
+ # different suggestions on different device types, e.g. DESKTOP, MOBILE. If it
71
+ # is empty, the suggestions are across all device types. Supported formats: *
72
+ # UNKNOWN_DEVICE_TYPE * DESKTOP * MOBILE * A customized string starts with
73
+ # OTHER_, e.g. OTHER_IPHONE.
74
+ # @param [Array<String>, String] language_codes
75
+ # The list of languages of the query. This is the BCP-47 language code, such as "
76
+ # en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages]
77
+ # (https://tools.ietf.org/html/bcp47). The maximum number of allowed characters
78
+ # is 255. Only "en-US" is currently supported.
79
+ # @param [Fixnum] max_suggestions
80
+ # Completion max suggestions. If left unset or set to 0, then will fallback to
81
+ # the configured value CompletionConfig.max_suggestions. The maximum allowed max
82
+ # suggestions is 20. If it is set higher, it will be capped by 20.
83
+ # @param [String] query
84
+ # Required. The query used to generate suggestions. The maximum number of
85
+ # allowed characters is 255.
86
+ # @param [String] visitor_id
87
+ # A unique identifier for tracking visitors. For example, this could be
88
+ # implemented with an HTTP cookie, which should be able to uniquely identify a
89
+ # visitor on a single device. This unique identifier should not change if the
90
+ # visitor logs in or out of the website. The field must be a UTF-8 encoded
91
+ # string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT
92
+ # error is returned.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
95
+ # @param [String] quota_user
96
+ # Available to use for quota purposes for server-side applications. Can be any
97
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
98
+ # @param [Google::Apis::RequestOptions] options
99
+ # Request-specific options
100
+ #
101
+ # @yield [result, err] Result & error if block supplied
102
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse] parsed result object
103
+ # @yieldparam err [StandardError] error object if request failed
104
+ #
105
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse]
106
+ #
107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
110
+ def complete_project_location_catalog_query(catalog, dataset: nil, device_type: nil, language_codes: nil, max_suggestions: nil, query: nil, visitor_id: nil, fields: nil, quota_user: nil, options: nil, &block)
111
+ command = make_simple_command(:get, 'v2beta/{+catalog}:completeQuery', options)
112
+ command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse::Representation
113
+ command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse
114
+ command.params['catalog'] = catalog unless catalog.nil?
115
+ command.query['dataset'] = dataset unless dataset.nil?
116
+ command.query['deviceType'] = device_type unless device_type.nil?
117
+ command.query['languageCodes'] = language_codes unless language_codes.nil?
118
+ command.query['maxSuggestions'] = max_suggestions unless max_suggestions.nil?
119
+ command.query['query'] = query unless query.nil?
120
+ command.query['visitorId'] = visitor_id unless visitor_id.nil?
121
+ command.query['fields'] = fields unless fields.nil?
122
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
123
+ execute_or_queue_command(command, &block)
124
+ end
125
+
126
+ # Get which branch is currently default branch set by CatalogService.
127
+ # SetDefaultBranch method under a specified parent catalog. This feature is only
128
+ # available for users who have Retail Search enabled. Please submit a form [here]
129
+ # (https://cloud.google.com/contact) to contact cloud sales if you are
130
+ # interested in using Retail Search.
131
+ # @param [String] catalog
132
+ # The parent catalog resource name, such as `projects/*/locations/global/
133
+ # catalogs/default_catalog`.
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil, &block)
152
+ command = make_simple_command(:get, 'v2beta/{+catalog}:getDefaultBranch', options)
153
+ command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse::Representation
154
+ command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse
155
+ command.params['catalog'] = catalog unless catalog.nil?
156
+ command.query['fields'] = fields unless fields.nil?
157
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
158
+ execute_or_queue_command(command, &block)
159
+ end
160
+
54
161
  # Lists all the Catalogs associated with the project.
55
162
  # @param [String] parent
56
163
  # Required. The account resource name with an associated location. If the caller
@@ -132,6 +239,59 @@ module Google
132
239
  execute_or_queue_command(command, &block)
133
240
  end
134
241
 
242
+ # Set a specified branch id as default branch. API methods such as SearchService.
243
+ # Search, ProductService.GetProduct, ProductService.ListProducts will treat
244
+ # requests using "default_branch" to the actual branch id set as default. For
245
+ # example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default,
246
+ # setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/
247
+ # default_branch` is equivalent to setting SearchRequest.branch to `projects/*/
248
+ # locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when
249
+ # developers would like to have a staging branch to test and verify for future
250
+ # usage. When it becomes ready, developers switch on the staging branch using
251
+ # this API while keeping using `projects/*/locations/*/catalogs/*/branches/
252
+ # default_branch` as SearchRequest.branch to route the traffic to this staging
253
+ # branch. CAUTION: If you have live predict/search traffic, switching the
254
+ # default branch could potentially cause outages if the ID space of the new
255
+ # branch is very different from the old one. More specifically: *
256
+ # PredictionService will only return product IDs from branch `newBranch`. *
257
+ # SearchService will only return product IDs from branch `newBranch` (if branch
258
+ # is not explicitly set). * UserEventService will only join events with products
259
+ # from branch `newBranch`. This feature is only available for users who have
260
+ # Retail Search enabled. Please submit a form [here](https://cloud.google.com/
261
+ # contact) to contact cloud sales if you are interested in using Retail Search.
262
+ # @param [String] catalog
263
+ # Full resource name of the catalog, such as `projects/*/locations/global/
264
+ # catalogs/default_catalog`.
265
+ # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetDefaultBranchRequest] google_cloud_retail_v2beta_set_default_branch_request_object
266
+ # @param [String] fields
267
+ # Selector specifying which fields to include in a partial response.
268
+ # @param [String] quota_user
269
+ # Available to use for quota purposes for server-side applications. Can be any
270
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
271
+ # @param [Google::Apis::RequestOptions] options
272
+ # Request-specific options
273
+ #
274
+ # @yield [result, err] Result & error if block supplied
275
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleProtobufEmpty] parsed result object
276
+ # @yieldparam err [StandardError] error object if request failed
277
+ #
278
+ # @return [Google::Apis::RetailV2beta::GoogleProtobufEmpty]
279
+ #
280
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
281
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
282
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
283
+ def set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2beta_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
284
+ command = make_simple_command(:post, 'v2beta/{+catalog}:setDefaultBranch', options)
285
+ command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetDefaultBranchRequest::Representation
286
+ command.request_object = google_cloud_retail_v2beta_set_default_branch_request_object
287
+ command.response_representation = Google::Apis::RetailV2beta::GoogleProtobufEmpty::Representation
288
+ command.response_class = Google::Apis::RetailV2beta::GoogleProtobufEmpty
289
+ command.params['catalog'] = catalog unless catalog.nil?
290
+ command.query['fields'] = fields unless fields.nil?
291
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
292
+ execute_or_queue_command(command, &block)
293
+ end
294
+
135
295
  # Gets the latest state of a long-running operation. Clients can use this method
136
296
  # to poll the operation result at intervals as recommended by the API service.
137
297
  # @param [String] name
@@ -163,6 +323,50 @@ module Google
163
323
  execute_or_queue_command(command, &block)
164
324
  end
165
325
 
326
+ # Incrementally adds place IDs to Product.fulfillment_info.place_ids. This
327
+ # process is asynchronous and does not require the Product to exist before
328
+ # updating fulfillment information. If the request is valid, the update will be
329
+ # enqueued and processed downstream. As a consequence, when a response is
330
+ # returned, the added place IDs are not immediately manifested in the Product
331
+ # queried by GetProduct or ListProducts. This feature is only available for
332
+ # users who have Retail Search enabled. Please submit a form [here](https://
333
+ # cloud.google.com/contact) to contact cloud sales if you are interested in
334
+ # using Retail Search.
335
+ # @param [String] product
336
+ # Required. Full resource name of Product, such as `projects/*/locations/global/
337
+ # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
338
+ # the caller does not have permission to access the Product, regardless of
339
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
340
+ # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAddFulfillmentPlacesRequest] google_cloud_retail_v2beta_add_fulfillment_places_request_object
341
+ # @param [String] fields
342
+ # Selector specifying which fields to include in a partial response.
343
+ # @param [String] quota_user
344
+ # Available to use for quota purposes for server-side applications. Can be any
345
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
346
+ # @param [Google::Apis::RequestOptions] options
347
+ # Request-specific options
348
+ #
349
+ # @yield [result, err] Result & error if block supplied
350
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object
351
+ # @yieldparam err [StandardError] error object if request failed
352
+ #
353
+ # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation]
354
+ #
355
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
356
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
357
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
358
+ def add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2beta_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
359
+ command = make_simple_command(:post, 'v2beta/{+product}:addFulfillmentPlaces', options)
360
+ command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAddFulfillmentPlacesRequest::Representation
361
+ command.request_object = google_cloud_retail_v2beta_add_fulfillment_places_request_object
362
+ command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation
363
+ command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation
364
+ command.params['product'] = product unless product.nil?
365
+ command.query['fields'] = fields unless fields.nil?
366
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
367
+ execute_or_queue_command(command, &block)
368
+ end
369
+
166
370
  # Creates a Product.
167
371
  # @param [String] parent
168
372
  # Required. The parent catalog resource name, such as `projects/*/locations/
@@ -315,6 +519,72 @@ module Google
315
519
  execute_or_queue_command(command, &block)
316
520
  end
317
521
 
522
+ # Gets a list of Products.
523
+ # @param [String] parent
524
+ # Required. The parent branch resource name, such as `projects/*/locations/
525
+ # global/catalogs/default_catalog/branches/0`. Use `default_branch` as the
526
+ # branch ID, to list products under the default branch. If the caller does not
527
+ # have permission to list Products under this branch, regardless of whether or
528
+ # not this branch exists, a PERMISSION_DENIED error is returned.
529
+ # @param [String] filter
530
+ # A filter to apply on the list results. Supported features: * List all the
531
+ # products under the parent branch if filter is unset. * List Product.Type.
532
+ # VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `
533
+ # primary_product_id = "some_product_id"` * List Products bundled in a Product.
534
+ # Type.COLLECTION Product. For example: `collection_product_id = "
535
+ # some_product_id"` * List Products with a partibular type. For example: `type =
536
+ # "PRIMARY"` `type = "VARIANT"` `type = "COLLECTION"` If the field is
537
+ # unrecognizable, an INVALID_ARGUMENT error is returned. If the specified
538
+ # Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist,
539
+ # a NOT_FOUND error is returned.
540
+ # @param [Fixnum] page_size
541
+ # Maximum number of Products to return. If unspecified, defaults to 100. The
542
+ # maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If
543
+ # this field is negative, an INVALID_ARGUMENT error is returned.
544
+ # @param [String] page_token
545
+ # A page token ListProductsResponse.next_page_token, received from a previous
546
+ # ProductService.ListProducts call. Provide this to retrieve the subsequent page.
547
+ # When paginating, all other parameters provided to ProductService.ListProducts
548
+ # must match the call that provided the page token. Otherwise, an
549
+ # INVALID_ARGUMENT error is returned.
550
+ # @param [String] read_mask
551
+ # The fields of Product to return in the responses. If not set or empty, the
552
+ # following fields are returned: * Product.name * Product.id * Product.title *
553
+ # Product.uri * Product.images * Product.price_info * Product.brands If "*" is
554
+ # provided, all fields are returned. Product.name is always returned no matter
555
+ # what mask is set. If an unsupported or unknown field is provided, an
556
+ # INVALID_ARGUMENT error is returned.
557
+ # @param [String] fields
558
+ # Selector specifying which fields to include in a partial response.
559
+ # @param [String] quota_user
560
+ # Available to use for quota purposes for server-side applications. Can be any
561
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
562
+ # @param [Google::Apis::RequestOptions] options
563
+ # Request-specific options
564
+ #
565
+ # @yield [result, err] Result & error if block supplied
566
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse] parsed result object
567
+ # @yieldparam err [StandardError] error object if request failed
568
+ #
569
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse]
570
+ #
571
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
572
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
573
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
574
+ def list_project_location_catalog_branch_products(parent, filter: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
575
+ command = make_simple_command(:get, 'v2beta/{+parent}/products', options)
576
+ command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse::Representation
577
+ command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse
578
+ command.params['parent'] = parent unless parent.nil?
579
+ command.query['filter'] = filter unless filter.nil?
580
+ command.query['pageSize'] = page_size unless page_size.nil?
581
+ command.query['pageToken'] = page_token unless page_token.nil?
582
+ command.query['readMask'] = read_mask unless read_mask.nil?
583
+ command.query['fields'] = fields unless fields.nil?
584
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
585
+ execute_or_queue_command(command, &block)
586
+ end
587
+
318
588
  # Updates a Product.
319
589
  # @param [String] name
320
590
  # Immutable. Full resource name of the product, such as `projects/*/locations/
@@ -361,6 +631,141 @@ module Google
361
631
  execute_or_queue_command(command, &block)
362
632
  end
363
633
 
634
+ # Incrementally removes place IDs from a Product.fulfillment_info.place_ids.
635
+ # This process is asynchronous and does not require the Product to exist before
636
+ # updating fulfillment information. If the request is valid, the update will be
637
+ # enqueued and processed downstream. As a consequence, when a response is
638
+ # returned, the removed place IDs are not immediately manifested in the Product
639
+ # queried by GetProduct or ListProducts. This feature is only available for
640
+ # users who have Retail Search enabled. Please submit a form [here](https://
641
+ # cloud.google.com/contact) to contact cloud sales if you are interested in
642
+ # using Retail Search.
643
+ # @param [String] product
644
+ # Required. Full resource name of Product, such as `projects/*/locations/global/
645
+ # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
646
+ # the caller does not have permission to access the Product, regardless of
647
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
648
+ # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRemoveFulfillmentPlacesRequest] google_cloud_retail_v2beta_remove_fulfillment_places_request_object
649
+ # @param [String] fields
650
+ # Selector specifying which fields to include in a partial response.
651
+ # @param [String] quota_user
652
+ # Available to use for quota purposes for server-side applications. Can be any
653
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
654
+ # @param [Google::Apis::RequestOptions] options
655
+ # Request-specific options
656
+ #
657
+ # @yield [result, err] Result & error if block supplied
658
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object
659
+ # @yieldparam err [StandardError] error object if request failed
660
+ #
661
+ # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation]
662
+ #
663
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
664
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
665
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
666
+ def remove_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2beta_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
667
+ command = make_simple_command(:post, 'v2beta/{+product}:removeFulfillmentPlaces', options)
668
+ command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRemoveFulfillmentPlacesRequest::Representation
669
+ command.request_object = google_cloud_retail_v2beta_remove_fulfillment_places_request_object
670
+ command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation
671
+ command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation
672
+ command.params['product'] = product unless product.nil?
673
+ command.query['fields'] = fields unless fields.nil?
674
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
675
+ execute_or_queue_command(command, &block)
676
+ end
677
+
678
+ # Updates inventory information for a Product while respecting the last update
679
+ # timestamps of each inventory field. This process is asynchronous and does not
680
+ # require the Product to exist before updating fulfillment information. If the
681
+ # request is valid, the update will be enqueued and processed downstream. As a
682
+ # consequence, when a response is returned, updates are not immediately
683
+ # manifested in the Product queried by GetProduct or ListProducts. When
684
+ # inventory is updated with CreateProduct and UpdateProduct, the specified
685
+ # inventory field value(s) will overwrite any existing value(s) while ignoring
686
+ # the last update time for this field. Furthermore, the last update time for the
687
+ # specified inventory fields will be overwritten to the time of the
688
+ # CreateProduct or UpdateProduct request. If no inventory fields are set in
689
+ # CreateProductRequest.product, then any pre-existing inventory information for
690
+ # this product will be used. If no inventory fields are set in
691
+ # UpdateProductRequest.set_mask, then any existing inventory information will be
692
+ # preserved. Pre-existing inventory information can only be updated with
693
+ # SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature
694
+ # is only available for users who have Retail Search enabled. Please submit a
695
+ # form [here](https://cloud.google.com/contact) to contact cloud sales if you
696
+ # are interested in using Retail Search.
697
+ # @param [String] name
698
+ # Immutable. Full resource name of the product, such as `projects/*/locations/
699
+ # global/catalogs/default_catalog/branches/default_branch/products/product_id`.
700
+ # The branch ID must be "default_branch".
701
+ # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetInventoryRequest] google_cloud_retail_v2beta_set_inventory_request_object
702
+ # @param [String] fields
703
+ # Selector specifying which fields to include in a partial response.
704
+ # @param [String] quota_user
705
+ # Available to use for quota purposes for server-side applications. Can be any
706
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
707
+ # @param [Google::Apis::RequestOptions] options
708
+ # Request-specific options
709
+ #
710
+ # @yield [result, err] Result & error if block supplied
711
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object
712
+ # @yieldparam err [StandardError] error object if request failed
713
+ #
714
+ # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation]
715
+ #
716
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
717
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
718
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
719
+ def set_project_location_catalog_branch_product_inventory(name, google_cloud_retail_v2beta_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
720
+ command = make_simple_command(:post, 'v2beta/{+name}:setInventory', options)
721
+ command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetInventoryRequest::Representation
722
+ command.request_object = google_cloud_retail_v2beta_set_inventory_request_object
723
+ command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation
724
+ command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation
725
+ command.params['name'] = name unless name.nil?
726
+ command.query['fields'] = fields unless fields.nil?
727
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
728
+ execute_or_queue_command(command, &block)
729
+ end
730
+
731
+ # Bulk import of processed completion dataset. Request processing may be
732
+ # synchronous. Partial updating is not supported. This feature is only available
733
+ # for users who have Retail Search enabled. Please submit a form [here](https://
734
+ # cloud.google.com/contact) to contact cloud sales if you are interested in
735
+ # using Retail Search.
736
+ # @param [String] parent
737
+ # Required. The catalog which the suggestions dataset belongs to. Format: `
738
+ # projects/1234/locations/global/catalogs/default_catalog`.
739
+ # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportCompletionDataRequest] google_cloud_retail_v2beta_import_completion_data_request_object
740
+ # @param [String] fields
741
+ # Selector specifying which fields to include in a partial response.
742
+ # @param [String] quota_user
743
+ # Available to use for quota purposes for server-side applications. Can be any
744
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
745
+ # @param [Google::Apis::RequestOptions] options
746
+ # Request-specific options
747
+ #
748
+ # @yield [result, err] Result & error if block supplied
749
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object
750
+ # @yieldparam err [StandardError] error object if request failed
751
+ #
752
+ # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation]
753
+ #
754
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
755
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
756
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
757
+ def import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2beta_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
758
+ command = make_simple_command(:post, 'v2beta/{+parent}/completionData:import', options)
759
+ command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportCompletionDataRequest::Representation
760
+ command.request_object = google_cloud_retail_v2beta_import_completion_data_request_object
761
+ command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation
762
+ command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation
763
+ command.params['parent'] = parent unless parent.nil?
764
+ command.query['fields'] = fields unless fields.nil?
765
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
766
+ execute_or_queue_command(command, &block)
767
+ end
768
+
364
769
  # Gets the latest state of a long-running operation. Clients can use this method
365
770
  # to poll the operation result at intervals as recommended by the API service.
366
771
  # @param [String] name
@@ -477,6 +882,45 @@ module Google
477
882
  execute_or_queue_command(command, &block)
478
883
  end
479
884
 
885
+ # Performs a search. This feature is only available for users who have Retail
886
+ # Search enabled. Please submit a form [here](https://cloud.google.com/contact)
887
+ # to contact cloud sales if you are interested in using Retail Search.
888
+ # @param [String] placement
889
+ # Required. The resource name of the search engine placement, such as `projects/*
890
+ # /locations/global/catalogs/default_catalog/placements/default_search`. This
891
+ # field is used to identify the set of models that will be used to make the
892
+ # search. We currently support one placement with the following ID: * `
893
+ # default_search`.
894
+ # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequest] google_cloud_retail_v2beta_search_request_object
895
+ # @param [String] fields
896
+ # Selector specifying which fields to include in a partial response.
897
+ # @param [String] quota_user
898
+ # Available to use for quota purposes for server-side applications. Can be any
899
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
900
+ # @param [Google::Apis::RequestOptions] options
901
+ # Request-specific options
902
+ #
903
+ # @yield [result, err] Result & error if block supplied
904
+ # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse] parsed result object
905
+ # @yieldparam err [StandardError] error object if request failed
906
+ #
907
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse]
908
+ #
909
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
910
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
911
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
912
+ def search_project_location_catalog_placements(placement, google_cloud_retail_v2beta_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
913
+ command = make_simple_command(:post, 'v2beta/{+placement}:search', options)
914
+ command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequest::Representation
915
+ command.request_object = google_cloud_retail_v2beta_search_request_object
916
+ command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse::Representation
917
+ command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse
918
+ command.params['placement'] = placement unless placement.nil?
919
+ command.query['fields'] = fields unless fields.nil?
920
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
921
+ execute_or_queue_command(command, &block)
922
+ end
923
+
480
924
  # Writes a single user event from the browser. This uses a GET request to due to
481
925
  # browser restriction of POST-ing to a 3rd party domain. This method is used
482
926
  # only by the Retail API JavaScript pixel and Google Tag Manager. Users should