lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.28.0 vs lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.29.0

- old
+ new

@@ -121,10 +121,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 an AttributesConfig. + # @param [String] name + # Required. Full AttributesConfig resource name. Format: projects/` + # project_number`/locations/`location_id`/catalogs/`catalog_id`/attributesConfig + # @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::GoogleCloudRetailV2betaAttributesConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig] + # + # @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_attributes_config(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig + 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`. @@ -285,10 +316,161 @@ 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 AttributesConfig. The catalog attributes in the request will be + # updated in the catalog, or inserted if they do not exist. Existing catalog + # attributes not included in the request will remain unchanged. Attributes that + # are assigned to products, but do not exist at the catalog level, are always + # included in the response. The product attribute is assigned default values for + # missing catalog attribute fields, e.g., searchable and dynamic facetable + # options. + # @param [String] name + # Required. Immutable. The fully qualified resource name of the attribute config. + # Format: "projects/*/locations/*/catalogs/*/attributesConfig" + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig] google_cloud_retail_v2beta_attributes_config_object + # @param [String] update_mask + # Indicates which fields in the provided AttributesConfig to update. The + # following is the only supported field: * AttributesConfig.catalog_attributes + # 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::GoogleCloudRetailV2betaAttributesConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig] + # + # @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_attributes_config(name, google_cloud_retail_v2beta_attributes_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::GoogleCloudRetailV2betaAttributesConfig::Representation + command.request_object = google_cloud_retail_v2beta_attributes_config_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig + 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 + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAddCatalogAttributeRequest] google_cloud_retail_v2beta_add_catalog_attribute_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::GoogleCloudRetailV2betaAttributesConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig] + # + # @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_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2beta_add_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+attributesConfig}:addCatalogAttribute', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAddCatalogAttributeRequest::Representation + command.request_object = google_cloud_retail_v2beta_add_catalog_attribute_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig + command.params['attributesConfig'] = attributes_config unless attributes_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 + + # Removes the specified CatalogAttribute from the AttributesConfig. If the + # CatalogAttribute to remove does not exist, a NOT_FOUND error is returned. + # @param [String] attributes_config + # Required. Full AttributesConfig resource name. Format: projects/` + # project_number`/locations/`location_id`/catalogs/`catalog_id`/attributesConfig + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRemoveCatalogAttributeRequest] google_cloud_retail_v2beta_remove_catalog_attribute_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::GoogleCloudRetailV2betaAttributesConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig] + # + # @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_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2beta_remove_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+attributesConfig}:removeCatalogAttribute', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRemoveCatalogAttributeRequest::Representation + command.request_object = google_cloud_retail_v2beta_remove_catalog_attribute_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig + command.params['attributesConfig'] = attributes_config unless attributes_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 + + # Replaces the specified CatalogAttribute in the AttributesConfig by updating + # the catalog attribute with the same CatalogAttribute.key. If the + # CatalogAttribute to replace does not exist, a NOT_FOUND error is returned. + # @param [String] attributes_config + # Required. Full AttributesConfig resource name. Format: projects/` + # project_number`/locations/`location_id`/catalogs/`catalog_id`/attributesConfig + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaReplaceCatalogAttributeRequest] google_cloud_retail_v2beta_replace_catalog_attribute_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::GoogleCloudRetailV2betaAttributesConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig] + # + # @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 replace_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2beta_replace_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+attributesConfig}:replaceCatalogAttribute', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaReplaceCatalogAttributeRequest::Representation + command.request_object = google_cloud_retail_v2beta_replace_catalog_attribute_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaAttributesConfig + command.params['attributesConfig'] = attributes_config unless attributes_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 + # 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 @@ -680,10 +862,10 @@ # 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 + # SetInventoryRequest.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. Please submit a # form [here](https://cloud.google.com/contact) to contact cloud sales if you # are interested in using Retail Search.