google-apis-retail_v2alpha 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -51,6 +51,110 @@ 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. Contact Retail Support (
56
+ # retail-search-support@google.com) if you are interested in using Retail Search.
57
+ # @param [String] catalog
58
+ # Required. Catalog for which the completion is performed. Full resource name of
59
+ # catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
60
+ # @param [String] dataset
61
+ # Determines which dataset to use for fetching completion. "user-data" will use
62
+ # the imported dataset through ImportCompletionData. "cloud-retail" will use the
63
+ # dataset generated by cloud retail based on user events. If leave empty, it
64
+ # will use the "user-data". Current supported values: * user-data * cloud-retail
65
+ # This option is not automatically enabled. Before using cloud-retail, contact
66
+ # retail-search-support@google.com first.
67
+ # @param [String] device_type
68
+ # The device type context for completion suggestions. It is useful to apply
69
+ # different suggestions on different device types, e.g. DESKTOP, MOBILE. If it
70
+ # is empty, the suggestions are across all device types. Supported formats: *
71
+ # UNKNOWN_DEVICE_TYPE * DESKTOP * MOBILE * A customized string starts with
72
+ # OTHER_, e.g. OTHER_IPHONE.
73
+ # @param [Array<String>, String] language_codes
74
+ # The list of languages of the query. This is the BCP-47 language code, such as "
75
+ # en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages]
76
+ # (https://tools.ietf.org/html/bcp47). The maximum number of allowed characters
77
+ # is 255. Only "en-US" is currently supported.
78
+ # @param [Fixnum] max_suggestions
79
+ # Completion max suggestions. The maximum allowed max suggestions is 20. The
80
+ # default value is 20.
81
+ # @param [String] query
82
+ # Required. The query used to generate suggestions. The maximum number of
83
+ # allowed characters is 255.
84
+ # @param [String] visitor_id
85
+ # A unique identifier for tracking visitors. For example, this could be
86
+ # implemented with an HTTP cookie, which should be able to uniquely identify a
87
+ # visitor on a single device. This unique identifier should not change if the
88
+ # visitor logs in or out of the website. The field must be a UTF-8 encoded
89
+ # string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT
90
+ # error is returned.
91
+ # @param [String] fields
92
+ # Selector specifying which fields to include in a partial response.
93
+ # @param [String] quota_user
94
+ # Available to use for quota purposes for server-side applications. Can be any
95
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
96
+ # @param [Google::Apis::RequestOptions] options
97
+ # Request-specific options
98
+ #
99
+ # @yield [result, err] Result & error if block supplied
100
+ # @yieldparam result [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponse] parsed result object
101
+ # @yieldparam err [StandardError] error object if request failed
102
+ #
103
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponse]
104
+ #
105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
108
+ 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)
109
+ command = make_simple_command(:get, 'v2alpha/{+catalog}:completeQuery', options)
110
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponse::Representation
111
+ command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponse
112
+ command.params['catalog'] = catalog unless catalog.nil?
113
+ command.query['dataset'] = dataset unless dataset.nil?
114
+ command.query['deviceType'] = device_type unless device_type.nil?
115
+ command.query['languageCodes'] = language_codes unless language_codes.nil?
116
+ command.query['maxSuggestions'] = max_suggestions unless max_suggestions.nil?
117
+ command.query['query'] = query unless query.nil?
118
+ command.query['visitorId'] = visitor_id unless visitor_id.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
124
+ # Get which branch is currently default branch set by CatalogService.
125
+ # SetDefaultBranch method under a specified parent catalog. This feature is only
126
+ # available for users who have Retail Search enabled. Contact Retail Support (
127
+ # retail-search-support@google.com) if you are interested in using Retail Search.
128
+ # @param [String] catalog
129
+ # The parent catalog resource name, such as `projects/*/locations/global/
130
+ # catalogs/default_catalog`.
131
+ # @param [String] fields
132
+ # Selector specifying which fields to include in a partial response.
133
+ # @param [String] quota_user
134
+ # Available to use for quota purposes for server-side applications. Can be any
135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
136
+ # @param [Google::Apis::RequestOptions] options
137
+ # Request-specific options
138
+ #
139
+ # @yield [result, err] Result & error if block supplied
140
+ # @yieldparam result [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGetDefaultBranchResponse] parsed result object
141
+ # @yieldparam err [StandardError] error object if request failed
142
+ #
143
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGetDefaultBranchResponse]
144
+ #
145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
148
+ def get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil, &block)
149
+ command = make_simple_command(:get, 'v2alpha/{+catalog}:getDefaultBranch', options)
150
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGetDefaultBranchResponse::Representation
151
+ command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGetDefaultBranchResponse
152
+ command.params['catalog'] = catalog unless catalog.nil?
153
+ command.query['fields'] = fields unless fields.nil?
154
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
155
+ execute_or_queue_command(command, &block)
156
+ end
157
+
54
158
  # Lists all the Catalogs associated with the project.
55
159
  # @param [String] parent
56
160
  # Required. The account resource name with an associated location. If the caller
@@ -132,6 +236,59 @@ module Google
132
236
  execute_or_queue_command(command, &block)
133
237
  end
134
238
 
239
+ # Set a specified branch id as default branch. API methods such as SearchService.
240
+ # Search, ProductService.GetProduct, ProductService.ListProducts will treat
241
+ # requests using "default_branch" to the actual branch id set as default. For
242
+ # example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default,
243
+ # setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/
244
+ # default_branch` is equivalent to setting SearchRequest.branch to `projects/*/
245
+ # locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when
246
+ # developers would like to have a staging branch to test and verify for future
247
+ # usage. When it becomes ready, developers switch on the staging branch using
248
+ # this API while keeping using `projects/*/locations/*/catalogs/*/branches/
249
+ # default_branch` as SearchRequest.branch to route the traffic to this staging
250
+ # branch. CAUTION: If you have live predict/search traffic, switching the
251
+ # default branch could potentially cause outages if the ID space of the new
252
+ # branch is very different from the old one. More specifically: *
253
+ # PredictionService will only return product IDs from branch `newBranch`. *
254
+ # SearchService will only return product IDs from branch `newBranch` (if branch
255
+ # is not explicitly set). * UserEventService will only join events with products
256
+ # from branch `newBranch`. This feature is only available for users who have
257
+ # Retail Search enabled. Contact Retail Support (retail-search-support@google.
258
+ # com) if you are interested in using Retail Search.
259
+ # @param [String] catalog
260
+ # Full resource name of the catalog, such as `projects/*/locations/global/
261
+ # catalogs/default_catalog`.
262
+ # @param [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetDefaultBranchRequest] google_cloud_retail_v2alpha_set_default_branch_request_object
263
+ # @param [String] fields
264
+ # Selector specifying which fields to include in a partial response.
265
+ # @param [String] quota_user
266
+ # Available to use for quota purposes for server-side applications. Can be any
267
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
268
+ # @param [Google::Apis::RequestOptions] options
269
+ # Request-specific options
270
+ #
271
+ # @yield [result, err] Result & error if block supplied
272
+ # @yieldparam result [Google::Apis::RetailV2alpha::GoogleProtobufEmpty] parsed result object
273
+ # @yieldparam err [StandardError] error object if request failed
274
+ #
275
+ # @return [Google::Apis::RetailV2alpha::GoogleProtobufEmpty]
276
+ #
277
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
278
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
279
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
280
+ def set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2alpha_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
281
+ command = make_simple_command(:post, 'v2alpha/{+catalog}:setDefaultBranch', options)
282
+ command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetDefaultBranchRequest::Representation
283
+ command.request_object = google_cloud_retail_v2alpha_set_default_branch_request_object
284
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation
285
+ command.response_class = Google::Apis::RetailV2alpha::GoogleProtobufEmpty
286
+ command.params['catalog'] = catalog unless catalog.nil?
287
+ command.query['fields'] = fields unless fields.nil?
288
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
289
+ execute_or_queue_command(command, &block)
290
+ end
291
+
135
292
  # Gets the latest state of a long-running operation. Clients can use this method
136
293
  # to poll the operation result at intervals as recommended by the API service.
137
294
  # @param [String] name
@@ -163,6 +320,49 @@ module Google
163
320
  execute_or_queue_command(command, &block)
164
321
  end
165
322
 
323
+ # Incrementally adds place IDs to Product.fulfillment_info.place_ids. This
324
+ # process is asynchronous and does not require the Product to exist before
325
+ # updating fulfillment information. If the request is valid, the update will be
326
+ # enqueued and processed downstream. As a consequence, when a response is
327
+ # returned, the added place IDs are not immediately manifested in the Product
328
+ # queried by GetProduct or ListProducts. This feature is only available for
329
+ # users who have Retail Search enabled. Contact Retail Support (retail-search-
330
+ # support@google.com) if you are interested in using Retail Search.
331
+ # @param [String] product
332
+ # Required. Full resource name of Product, such as `projects/*/locations/global/
333
+ # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
334
+ # the caller does not have permission to access the Product, regardless of
335
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
336
+ # @param [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest] google_cloud_retail_v2alpha_add_fulfillment_places_request_object
337
+ # @param [String] fields
338
+ # Selector specifying which fields to include in a partial response.
339
+ # @param [String] quota_user
340
+ # Available to use for quota purposes for server-side applications. Can be any
341
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
342
+ # @param [Google::Apis::RequestOptions] options
343
+ # Request-specific options
344
+ #
345
+ # @yield [result, err] Result & error if block supplied
346
+ # @yieldparam result [Google::Apis::RetailV2alpha::GoogleLongrunningOperation] parsed result object
347
+ # @yieldparam err [StandardError] error object if request failed
348
+ #
349
+ # @return [Google::Apis::RetailV2alpha::GoogleLongrunningOperation]
350
+ #
351
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
352
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
353
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
354
+ def add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2alpha_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
355
+ command = make_simple_command(:post, 'v2alpha/{+product}:addFulfillmentPlaces', options)
356
+ command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest::Representation
357
+ command.request_object = google_cloud_retail_v2alpha_add_fulfillment_places_request_object
358
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
359
+ command.response_class = Google::Apis::RetailV2alpha::GoogleLongrunningOperation
360
+ command.params['product'] = product unless product.nil?
361
+ command.query['fields'] = fields unless fields.nil?
362
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
363
+ execute_or_queue_command(command, &block)
364
+ end
365
+
166
366
  # Creates a Product.
167
367
  # @param [String] parent
168
368
  # Required. The parent catalog resource name, such as `projects/*/locations/
@@ -315,6 +515,77 @@ module Google
315
515
  execute_or_queue_command(command, &block)
316
516
  end
317
517
 
518
+ # Gets a list of Products.
519
+ # @param [String] parent
520
+ # Required. The parent branch resource name, such as `projects/*/locations/
521
+ # global/catalogs/default_catalog/branches/0`. Use `default_branch` as the
522
+ # branch ID, to list products under the default branch. If the caller does not
523
+ # have permission to list Products under this branch, regardless of whether or
524
+ # not this branch exists, a PERMISSION_DENIED error is returned.
525
+ # @param [String] filter
526
+ # A filter to apply on the list results. Supported features: * List all the
527
+ # products under the parent branch if filter is unset. * List Product.Type.
528
+ # VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `
529
+ # primary_product_id = "some_product_id"` * List Products bundled in a Product.
530
+ # Type.COLLECTION Product. For example: `collection_product_id = "
531
+ # some_product_id"` * List Products with a partibular type. For example: `type =
532
+ # "PRIMARY"` `type = "VARIANT"` `type = "COLLECTION"` If the field is
533
+ # unrecognizable, an INVALID_ARGUMENT error is returned. If the specified
534
+ # Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist,
535
+ # a NOT_FOUND error is returned.
536
+ # @param [Fixnum] page_size
537
+ # Maximum number of Products to return. If unspecified, defaults to 100. The
538
+ # maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If
539
+ # this field is negative, an INVALID_ARGUMENT error is returned.
540
+ # @param [String] page_token
541
+ # A page token ListProductsResponse.next_page_token, received from a previous
542
+ # ProductService.ListProducts call. Provide this to retrieve the subsequent page.
543
+ # When paginating, all other parameters provided to ProductService.ListProducts
544
+ # must match the call that provided the page token. Otherwise, an
545
+ # INVALID_ARGUMENT error is returned.
546
+ # @param [String] read_mask
547
+ # The fields of Product to return in the responses. If not set or empty, the
548
+ # following fields are returned: * Product.name * Product.id * Product.title *
549
+ # Product.uri * Product.images * Product.price_info * Product.brands If "*" is
550
+ # provided, all fields are returned. Product.name is always returned no matter
551
+ # what mask is set. If an unsupported or unknown field is provided, an
552
+ # INVALID_ARGUMENT error is returned.
553
+ # @param [Boolean] require_total_size
554
+ # If true and page_token is empty, ListProductsResponse.total_size is set to the
555
+ # total count of matched items irrespective of pagination. Notice that setting
556
+ # this field to true affects the performance.
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::RetailV2alpha::GoogleCloudRetailV2alphaListProductsResponse] parsed result object
567
+ # @yieldparam err [StandardError] error object if request failed
568
+ #
569
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListProductsResponse]
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, require_total_size: nil, fields: nil, quota_user: nil, options: nil, &block)
575
+ command = make_simple_command(:get, 'v2alpha/{+parent}/products', options)
576
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListProductsResponse::Representation
577
+ command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListProductsResponse
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['requireTotalSize'] = require_total_size unless require_total_size.nil?
584
+ command.query['fields'] = fields unless fields.nil?
585
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
586
+ execute_or_queue_command(command, &block)
587
+ end
588
+
318
589
  # Updates a Product.
319
590
  # @param [String] name
320
591
  # Immutable. Full resource name of the product, such as `projects/*/locations/
@@ -361,6 +632,139 @@ module Google
361
632
  execute_or_queue_command(command, &block)
362
633
  end
363
634
 
635
+ # Incrementally removes place IDs from a Product.fulfillment_info.place_ids.
636
+ # This process is asynchronous and does not require the Product to exist before
637
+ # updating fulfillment information. If the request is valid, the update will be
638
+ # enqueued and processed downstream. As a consequence, when a response is
639
+ # returned, the removed place IDs are not immediately manifested in the Product
640
+ # queried by GetProduct or ListProducts. This feature is only available for
641
+ # users who have Retail Search enabled. Contact Retail Support (retail-search-
642
+ # support@google.com) if you are interested in 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::RetailV2alpha::GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleLongrunningOperation] parsed result object
659
+ # @yieldparam err [StandardError] error object if request failed
660
+ #
661
+ # @return [Google::Apis::RetailV2alpha::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_v2alpha_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
667
+ command = make_simple_command(:post, 'v2alpha/{+product}:removeFulfillmentPlaces', options)
668
+ command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest::Representation
669
+ command.request_object = google_cloud_retail_v2alpha_remove_fulfillment_places_request_object
670
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
671
+ command.response_class = Google::Apis::RetailV2alpha::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. Contact Retail
695
+ # Support (retail-search-support@google.com) if you are interested in using
696
+ # 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::RetailV2alpha::GoogleCloudRetailV2alphaSetInventoryRequest] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleLongrunningOperation] parsed result object
712
+ # @yieldparam err [StandardError] error object if request failed
713
+ #
714
+ # @return [Google::Apis::RetailV2alpha::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_v2alpha_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
720
+ command = make_simple_command(:post, 'v2alpha/{+name}:setInventory', options)
721
+ command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetInventoryRequest::Representation
722
+ command.request_object = google_cloud_retail_v2alpha_set_inventory_request_object
723
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
724
+ command.response_class = Google::Apis::RetailV2alpha::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. Contact Retail Support (retail-
734
+ # search-support@google.com) if you are interested in using Retail Search.
735
+ # @param [String] parent
736
+ # Required. The catalog which the suggestions dataset belongs to. Format: `
737
+ # projects/1234/locations/global/catalogs/default_catalog`.
738
+ # @param [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportCompletionDataRequest] google_cloud_retail_v2alpha_import_completion_data_request_object
739
+ # @param [String] fields
740
+ # Selector specifying which fields to include in a partial response.
741
+ # @param [String] quota_user
742
+ # Available to use for quota purposes for server-side applications. Can be any
743
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
744
+ # @param [Google::Apis::RequestOptions] options
745
+ # Request-specific options
746
+ #
747
+ # @yield [result, err] Result & error if block supplied
748
+ # @yieldparam result [Google::Apis::RetailV2alpha::GoogleLongrunningOperation] parsed result object
749
+ # @yieldparam err [StandardError] error object if request failed
750
+ #
751
+ # @return [Google::Apis::RetailV2alpha::GoogleLongrunningOperation]
752
+ #
753
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
754
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
755
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
756
+ def import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2alpha_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
757
+ command = make_simple_command(:post, 'v2alpha/{+parent}/completionData:import', options)
758
+ command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportCompletionDataRequest::Representation
759
+ command.request_object = google_cloud_retail_v2alpha_import_completion_data_request_object
760
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
761
+ command.response_class = Google::Apis::RetailV2alpha::GoogleLongrunningOperation
762
+ command.params['parent'] = parent unless parent.nil?
763
+ command.query['fields'] = fields unless fields.nil?
764
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
765
+ execute_or_queue_command(command, &block)
766
+ end
767
+
364
768
  # Gets the latest state of a long-running operation. Clients can use this method
365
769
  # to poll the operation result at intervals as recommended by the API service.
366
770
  # @param [String] name
@@ -477,6 +881,45 @@ module Google
477
881
  execute_or_queue_command(command, &block)
478
882
  end
479
883
 
884
+ # Performs a search. This feature is only available for users who have Retail
885
+ # Search enabled. Contact Retail Support (retail-search-support@google.com) if
886
+ # you are interested in using Retail Search.
887
+ # @param [String] placement
888
+ # Required. The resource name of the search engine placement, such as `projects/*
889
+ # /locations/global/catalogs/default_catalog/placements/default_search`. This
890
+ # field is used to identify the set of models that will be used to make the
891
+ # search. We currently support one placement with the following ID: * `
892
+ # default_search`.
893
+ # @param [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequest] google_cloud_retail_v2alpha_search_request_object
894
+ # @param [String] fields
895
+ # Selector specifying which fields to include in a partial response.
896
+ # @param [String] quota_user
897
+ # Available to use for quota purposes for server-side applications. Can be any
898
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
899
+ # @param [Google::Apis::RequestOptions] options
900
+ # Request-specific options
901
+ #
902
+ # @yield [result, err] Result & error if block supplied
903
+ # @yieldparam result [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse] parsed result object
904
+ # @yieldparam err [StandardError] error object if request failed
905
+ #
906
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse]
907
+ #
908
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
909
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
910
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
911
+ def search_project_location_catalog_placements(placement, google_cloud_retail_v2alpha_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
912
+ command = make_simple_command(:post, 'v2alpha/{+placement}:search', options)
913
+ command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequest::Representation
914
+ command.request_object = google_cloud_retail_v2alpha_search_request_object
915
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse::Representation
916
+ command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse
917
+ command.params['placement'] = placement unless placement.nil?
918
+ command.query['fields'] = fields unless fields.nil?
919
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
920
+ execute_or_queue_command(command, &block)
921
+ end
922
+
480
923
  # Writes a single user event from the browser. This uses a GET request to due to
481
924
  # browser restriction of POST-ing to a 3rd party domain. This method is used
482
925
  # only by the Retail API JavaScript pixel and Google Tag Manager. Users should