* $retailService = new Google\Service\CloudRetail(...); * $attributesConfig = $retailService->projects_locations_catalogs_attributesConfig; * */ class ProjectsLocationsCatalogsAttributesConfig extends \Google\Service\Resource { /** * Adds the specified CatalogAttribute to the AttributesConfig. If the * CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned. * (attributesConfig.addCatalogAttribute) * * @param string $attributesConfig Required. Full AttributesConfig resource * name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{ca * talog_id}/attributesConfig` * @param GoogleCloudRetailV2AddCatalogAttributeRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudRetailV2AttributesConfig */ public function addCatalogAttribute($attributesConfig, GoogleCloudRetailV2AddCatalogAttributeRequest $postBody, $optParams = []) { $params = ['attributesConfig' => $attributesConfig, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('addCatalogAttribute', [$params], GoogleCloudRetailV2AttributesConfig::class); } /** * Removes the specified CatalogAttribute from the AttributesConfig. If the * CatalogAttribute to remove does not exist, a NOT_FOUND error is returned. * (attributesConfig.removeCatalogAttribute) * * @param string $attributesConfig Required. Full AttributesConfig resource * name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{ca * talog_id}/attributesConfig` * @param GoogleCloudRetailV2RemoveCatalogAttributeRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudRetailV2AttributesConfig */ public function removeCatalogAttribute($attributesConfig, GoogleCloudRetailV2RemoveCatalogAttributeRequest $postBody, $optParams = []) { $params = ['attributesConfig' => $attributesConfig, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('removeCatalogAttribute', [$params], GoogleCloudRetailV2AttributesConfig::class); } /** * 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. * (attributesConfig.replaceCatalogAttribute) * * @param string $attributesConfig Required. Full AttributesConfig resource * name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{ca * talog_id}/attributesConfig` * @param GoogleCloudRetailV2ReplaceCatalogAttributeRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudRetailV2AttributesConfig */ public function replaceCatalogAttribute($attributesConfig, GoogleCloudRetailV2ReplaceCatalogAttributeRequest $postBody, $optParams = []) { $params = ['attributesConfig' => $attributesConfig, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('replaceCatalogAttribute', [$params], GoogleCloudRetailV2AttributesConfig::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsLocationsCatalogsAttributesConfig::class, 'Google_Service_CloudRetail_Resource_ProjectsLocationsCatalogsAttributesConfig');