lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.12.0 vs lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.13.0

- old
+ new

@@ -49,10 +49,114 @@ client_name: 'google-apis-retail_v2beta', client_version: Google::Apis::RetailV2beta::GEM_VERSION) @batch_path = 'batch' end + # Completes the specified prefix with keyword suggestions. This feature is only + # available for users who have Retail Search enabled. Contact Retail Support ( + # retail-search-support@google.com) if you are interested in using Retail Search. + # @param [String] catalog + # Required. Catalog for which the completion is performed. Full resource name of + # catalog, such as `projects/*/locations/global/catalogs/default_catalog`. + # @param [String] dataset + # Determines which dataset to use for fetching completion. "user-data" will use + # the imported dataset through ImportCompletionData. "cloud-retail" will use the + # dataset generated by cloud retail based on user events. If leave empty, it + # will use the "user-data". Current supported values: * user-data * cloud-retail + # This option is not automatically enabled. Before using cloud-retail, contact + # retail-search-support@google.com first. + # @param [String] device_type + # The device type context for completion suggestions. It is useful to apply + # different suggestions on different device types, e.g. DESKTOP, MOBILE. If it + # is empty, the suggestions are across all device types. Supported formats: * + # UNKNOWN_DEVICE_TYPE * DESKTOP * MOBILE * A customized string starts with + # OTHER_, e.g. OTHER_IPHONE. + # @param [Array<String>, String] language_codes + # The list of languages of the query. This is the BCP-47 language code, such as " + # en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages] + # (https://tools.ietf.org/html/bcp47). The maximum number of allowed characters + # is 255. Only "en-US" is currently supported. + # @param [Fixnum] max_suggestions + # Completion max suggestions. The maximum allowed max suggestions is 20. The + # default value is 20. + # @param [String] query + # Required. The query used to generate suggestions. The maximum number of + # allowed characters is 255. + # @param [String] visitor_id + # A unique identifier for tracking visitors. For example, this could be + # implemented with an HTTP cookie, which should be able to uniquely identify a + # visitor on a single device. This unique identifier should not change if the + # visitor logs in or out of the website. The field must be a UTF-8 encoded + # string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + # error is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + 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) + command = make_simple_command(:get, 'v2beta/{+catalog}:completeQuery', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse + command.params['catalog'] = catalog unless catalog.nil? + command.query['dataset'] = dataset unless dataset.nil? + command.query['deviceType'] = device_type unless device_type.nil? + command.query['languageCodes'] = language_codes unless language_codes.nil? + command.query['maxSuggestions'] = max_suggestions unless max_suggestions.nil? + command.query['query'] = query unless query.nil? + command.query['visitorId'] = visitor_id unless visitor_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get which branch is currently default branch set by CatalogService. + # SetDefaultBranch method under a specified parent catalog. This feature is only + # available for users who have Retail Search enabled. Contact Retail Support ( + # retail-search-support@google.com) if you are interested in using Retail Search. + # @param [String] catalog + # The parent catalog resource name, such as `projects/*/locations/global/ + # catalogs/default_catalog`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta/{+catalog}:getDefaultBranch', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGetDefaultBranchResponse + command.params['catalog'] = catalog unless catalog.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Lists all the Catalogs associated with the project. # @param [String] parent # Required. The account resource name with an associated location. If the caller # does not have permission to list Catalogs under this location, regardless of # whether or not this location exists, a PERMISSION_DENIED error is returned. @@ -130,10 +234,63 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Set a specified branch id as default branch. API methods such as SearchService. + # Search, ProductService.GetProduct, ProductService.ListProducts will treat + # requests using "default_branch" to the actual branch id set as default. For + # example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, + # setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/ + # default_branch` is equivalent to setting SearchRequest.branch to `projects/*/ + # locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when + # developers would like to have a staging branch to test and verify for future + # usage. When it becomes ready, developers switch on the staging branch using + # this API while keeping using `projects/*/locations/*/catalogs/*/branches/ + # default_branch` as SearchRequest.branch to route the traffic to this staging + # branch. CAUTION: If you have live predict/search traffic, switching the + # default branch could potentially cause outages if the ID space of the new + # branch is very different from the old one. More specifically: * + # PredictionService will only return product IDs from branch `newBranch`. * + # SearchService will only return product IDs from branch `newBranch` (if branch + # is not explicitly set). * UserEventService will only join events with products + # from branch `newBranch`. This feature is only available for users who have + # Retail Search enabled. Contact Retail Support (retail-search-support@google. + # com) if you are interested in using Retail Search. + # @param [String] catalog + # Full resource name of the catalog, such as `projects/*/locations/global/ + # catalogs/default_catalog`. + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetDefaultBranchRequest] google_cloud_retail_v2beta_set_default_branch_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleProtobufEmpty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + 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) + command = make_simple_command(:post, 'v2beta/{+catalog}:setDefaultBranch', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetDefaultBranchRequest::Representation + command.request_object = google_cloud_retail_v2beta_set_default_branch_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleProtobufEmpty + command.params['catalog'] = catalog unless catalog.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Gets the latest state of a long-running operation. Clients can use this method # to poll the operation result at intervals as recommended by the API service. # @param [String] name # The name of the operation resource. # @param [String] fields @@ -161,10 +318,53 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Incrementally adds place IDs to Product.fulfillment_info.place_ids. This + # process is asynchronous and does not require the Product to exist before + # updating fulfillment information. If the request is valid, the update will be + # enqueued and processed downstream. As a consequence, when a response is + # returned, the added place IDs are not immediately manifested in the Product + # queried by GetProduct or ListProducts. This feature is only available for + # users who have Retail Search enabled. Contact Retail Support (retail-search- + # support@google.com) if you are interested in using Retail Search. + # @param [String] product + # Required. Full resource name of Product, such as `projects/*/locations/global/ + # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If + # the caller does not have permission to access the Product, regardless of + # whether or not it exists, a PERMISSION_DENIED error is returned. + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAddFulfillmentPlacesRequest] google_cloud_retail_v2beta_add_fulfillment_places_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + 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) + command = make_simple_command(:post, 'v2beta/{+product}:addFulfillmentPlaces', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAddFulfillmentPlacesRequest::Representation + command.request_object = google_cloud_retail_v2beta_add_fulfillment_places_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation + command.params['product'] = product unless product.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a Product. # @param [String] parent # Required. The parent catalog resource name, such as `projects/*/locations/ # global/catalogs/default_catalog/branches/default_branch`. # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct] google_cloud_retail_v2beta_product_object @@ -313,10 +513,76 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Gets a list of Products. + # @param [String] parent + # Required. The parent branch resource name, such as `projects/*/locations/ + # global/catalogs/default_catalog/branches/0`. Use `default_branch` as the + # branch ID, to list products under the default branch. If the caller does not + # have permission to list Products under this branch, regardless of whether or + # not this branch exists, a PERMISSION_DENIED error is returned. + # @param [String] filter + # A filter to apply on the list results. Supported features: * List all the + # products under the parent branch if filter is unset. * List Product.Type. + # VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: ` + # primary_product_id = "some_product_id"` * List Products bundled in a Product. + # Type.COLLECTION Product. For example: `collection_product_id = " + # some_product_id"` * List Products with a partibular type. For example: `type = + # "PRIMARY"` `type = "VARIANT"` `type = "COLLECTION"` If the field is + # unrecognizable, an INVALID_ARGUMENT error is returned. If the specified + # Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, + # a NOT_FOUND error is returned. + # @param [Fixnum] page_size + # Maximum number of Products to return. If unspecified, defaults to 100. The + # maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If + # this field is negative, an INVALID_ARGUMENT error is returned. + # @param [String] page_token + # A page token ListProductsResponse.next_page_token, received from a previous + # ProductService.ListProducts call. Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to ProductService.ListProducts + # must match the call that provided the page token. Otherwise, an + # INVALID_ARGUMENT error is returned. + # @param [String] read_mask + # The fields of Product to return in the responses. If not set or empty, the + # following fields are returned: * Product.name * Product.id * Product.title * + # Product.uri * Product.images * Product.price_info * Product.brands If "*" is + # provided, all fields are returned. Product.name is always returned no matter + # what mask is set. If an unsupported or unknown field is provided, an + # INVALID_ARGUMENT error is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + 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) + command = make_simple_command(:get, 'v2beta/{+parent}/products', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListProductsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['readMask'] = read_mask unless read_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Updates a Product. # @param [String] name # Immutable. Full resource name of the product, such as `projects/*/locations/ # global/catalogs/default_catalog/branches/default_branch/products/product_id`. # The branch ID must be "default_branch". @@ -359,10 +625,143 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Incrementally removes place IDs from a Product.fulfillment_info.place_ids. + # This process is asynchronous and does not require the Product to exist before + # updating fulfillment information. If the request is valid, the update will be + # enqueued and processed downstream. As a consequence, when a response is + # returned, the removed place IDs are not immediately manifested in the Product + # queried by GetProduct or ListProducts. This feature is only available for + # users who have Retail Search enabled. Contact Retail Support (retail-search- + # support@google.com) if you are interested in using Retail Search. + # @param [String] product + # Required. Full resource name of Product, such as `projects/*/locations/global/ + # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If + # the caller does not have permission to access the Product, regardless of + # whether or not it exists, a PERMISSION_DENIED error is returned. + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRemoveFulfillmentPlacesRequest] google_cloud_retail_v2beta_remove_fulfillment_places_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + 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) + command = make_simple_command(:post, 'v2beta/{+product}:removeFulfillmentPlaces', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRemoveFulfillmentPlacesRequest::Representation + command.request_object = google_cloud_retail_v2beta_remove_fulfillment_places_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation + command.params['product'] = product unless product.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates inventory information for a Product while respecting the last update + # timestamps of each inventory field. This process is asynchronous and does not + # require the Product to exist before updating fulfillment information. If the + # request is valid, the update will be enqueued and processed downstream. As a + # consequence, when a response is returned, updates are not immediately + # manifested in the Product queried by GetProduct or ListProducts. When + # inventory is updated with CreateProduct and UpdateProduct, the specified + # inventory field value(s) will overwrite any existing value(s) while ignoring + # the last update time for this field. Furthermore, the last update time for the + # specified inventory fields will be overwritten to the time of the + # CreateProduct or UpdateProduct request. If no inventory fields are set in + # CreateProductRequest.product, then any pre-existing inventory information for + # this product will be used. If no inventory fields are set in + # UpdateProductRequest.set_mask, then any existing inventory information will be + # preserved. Pre-existing inventory information can only be updated with + # SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature + # is only available for users who have Retail Search enabled. Contact Retail + # Support (retail-search-support@google.com) if you are interested in using + # Retail Search. + # @param [String] name + # Immutable. Full resource name of the product, such as `projects/*/locations/ + # global/catalogs/default_catalog/branches/default_branch/products/product_id`. + # The branch ID must be "default_branch". + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetInventoryRequest] google_cloud_retail_v2beta_set_inventory_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + 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) + command = make_simple_command(:post, 'v2beta/{+name}:setInventory', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetInventoryRequest::Representation + command.request_object = google_cloud_retail_v2beta_set_inventory_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Bulk import of processed completion dataset. Request processing may be + # synchronous. Partial updating is not supported. This feature is only available + # for users who have Retail Search enabled. Contact Retail Support (retail- + # search-support@google.com) if you are interested in using Retail Search. + # @param [String] parent + # Required. The catalog which the suggestions dataset belongs to. Format: ` + # projects/1234/locations/global/catalogs/default_catalog`. + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportCompletionDataRequest] google_cloud_retail_v2beta_import_completion_data_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + 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) + command = make_simple_command(:post, 'v2beta/{+parent}/completionData:import', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportCompletionDataRequest::Representation + command.request_object = google_cloud_retail_v2beta_import_completion_data_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Gets the latest state of a long-running operation. Clients can use this method # to poll the operation result at intervals as recommended by the API service. # @param [String] name # The name of the operation resource. # @param [String] fields @@ -469,9 +868,48 @@ command = make_simple_command(:post, 'v2beta/{+placement}:predict', options) command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictRequest::Representation command.request_object = google_cloud_retail_v2beta_predict_request_object command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponse::Representation command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponse + command.params['placement'] = placement unless placement.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Performs a search. This feature is only available for users who have Retail + # Search enabled. Contact Retail Support (retail-search-support@google.com) if + # you are interested in using Retail Search. + # @param [String] placement + # Required. The resource name of the search engine placement, such as `projects/* + # /locations/global/catalogs/default_catalog/placements/default_search`. This + # field is used to identify the set of models that will be used to make the + # search. We currently support one placement with the following ID: * ` + # default_search`. + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequest] google_cloud_retail_v2beta_search_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_project_location_catalog_placements(placement, google_cloud_retail_v2beta_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+placement}:search', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequest::Representation + command.request_object = google_cloud_retail_v2beta_search_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponse command.params['placement'] = placement unless placement.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end