lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.32.0 vs lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.33.0

- old
+ new

@@ -154,10 +154,41 @@ 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 CompletionConfig. + # @param [String] name + # Required. Full CompletionConfig resource name. Format: projects/` + # project_number`/locations/`location_id`/catalogs/`catalog_id`/completionConfig + # @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::GoogleCloudRetailV2betaCompletionConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig] + # + # @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_completion_config(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig + 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 + # Get which branch is currently default branch set by CatalogService. # SetDefaultBranch method under a specified parent catalog. # @param [String] catalog # The parent catalog resource name, such as `projects/*/locations/global/ # catalogs/default_catalog`. @@ -363,10 +394,50 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Updates the CompletionConfigs. + # @param [String] name + # Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/ + # completionConfig + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig] google_cloud_retail_v2beta_completion_config_object + # @param [String] update_mask + # Indicates which fields in the provided CompletionConfig to update. The + # following are the only supported fields: * CompletionConfig.matching_order * + # CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * + # CompletionConfig.auto_learning If not set, all supported fields are updated. + # @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::GoogleCloudRetailV2betaCompletionConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig] + # + # @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 update_project_location_catalog_completion_config(name, google_cloud_retail_v2beta_completion_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2beta/{+name}', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig::Representation + command.request_object = google_cloud_retail_v2beta_completion_config_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompletionConfig + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_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 + # Adds the specified CatalogAttribute to the AttributesConfig. If the # CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned. # @param [String] attributes_config # Required. Full AttributesConfig resource name. Format: projects/` # project_number`/locations/`location_id`/catalogs/`catalog_id`/attributesConfig @@ -903,13 +974,15 @@ 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. Please submit a form [here](https:// + # Bulk import of processed completion dataset. Request processing is + # asynchronous. Partial updating is not supported. The operation is successfully + # finished only after the imported suggestions are indexed successfully and + # ready for serving. The process takes hours. This feature is only available for + # users who have Retail Search enabled. Please submit a form [here](https:// # cloud.google.com/contact) to contact cloud sales 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`. @@ -1212,11 +1285,12 @@ end # Makes a recommendation prediction. # @param [String] placement # Required. Full resource name of the format: `name=projects/*/locations/global/ - # catalogs/default_catalog/placements/*` The ID of the Recommendations AI + # catalogs/default_catalog/placements/*` or `name=projects/*/locations/global/ + # catalogs/default_catalog/servingConfigs/*` The ID of the Recommendations AI # placement. Before you can request predictions from your model, you must create # at least one placement for it. For more information, see [Managing placements]( # https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). # The full list of available placements can be seen at https://console.cloud. # google.com/recommendation/catalogs/default_catalog/placements @@ -1253,13 +1327,14 @@ # Performs a search. This feature is only available for users who have Retail # Search enabled. Please submit a form [here](https://cloud.google.com/contact) # to contact cloud sales 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 serving configuration name and the set of models - # that will be used to make the search. + # /locations/global/catalogs/default_catalog/placements/default_search` or ` + # projects/*/locations/global/catalogs/default_catalog/servingConfigs/ + # default_serving_config` This field is used to identify the serving + # configuration name and the set of models that will be used to make the 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 @@ -1510,10 +1585,50 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Makes a recommendation prediction. + # @param [String] placement + # Required. Full resource name of the format: `name=projects/*/locations/global/ + # catalogs/default_catalog/placements/*` or `name=projects/*/locations/global/ + # catalogs/default_catalog/servingConfigs/*` The ID of the Recommendations AI + # placement. Before you can request predictions from your model, you must create + # at least one placement for it. For more information, see [Managing placements]( + # https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). + # The full list of available placements can be seen at https://console.cloud. + # google.com/recommendation/catalogs/default_catalog/placements + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictRequest] google_cloud_retail_v2beta_predict_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::GoogleCloudRetailV2betaPredictResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponse] + # + # @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 predict_project_location_catalog_serving_config(placement, google_cloud_retail_v2beta_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + 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 + # Disables a Control on the specified ServingConfig. The control is removed from # the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for # the ServingConfig. # @param [String] serving_config # Required. The source ServingConfig resource name . Format: projects/` @@ -1542,9 +1657,48 @@ command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRemoveControlRequest::Representation command.request_object = google_cloud_retail_v2beta_remove_control_request_object command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaServingConfig::Representation command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaServingConfig command.params['servingConfig'] = serving_config unless serving_config.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. Please submit a form [here](https://cloud.google.com/contact) + # to contact cloud sales 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` or ` + # projects/*/locations/global/catalogs/default_catalog/servingConfigs/ + # default_serving_config` This field is used to identify the serving + # configuration name and the set of models that will be used to make the 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_serving_configs(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