class ProjectsLocationsCatalogs extends Resource (View source)

The "catalogs" collection of methods.

Typical usage is:

 $retailService = new Google\Service\CloudRetail(...);
 $catalogs = $retailService->projects_locations_catalogs;

Methods

completeQuery(string $catalog, array $optParams = [])

Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature. (catalogs.completeQuery)

exportAnalyticsMetrics(string $catalog, GoogleCloudRetailV2ExportAnalyticsMetricsRequest $postBody, array $optParams = [])

Exports analytics metrics. Operation.response is of type ExportAnalyticsMetricsResponse. Operation.metadata is of type ExportMetadata. (catalogs.exportAnalyticsMetrics)

getAttributesConfig(string $name, array $optParams = [])

Gets an AttributesConfig. (catalogs.getAttributesConfig)

getCompletionConfig(string $name, array $optParams = [])

Gets a CompletionConfig. (catalogs.getCompletionConfig)

getDefaultBranch(string $catalog, array $optParams = [])

Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.

listProjectsLocationsCatalogs(string $parent, array $optParams = [])

Lists all the Catalogs associated with the project.

patch(string $name, GoogleCloudRetailV2Catalog $postBody, array $optParams = [])

Updates the Catalogs. (catalogs.patch)

setDefaultBranch(string $catalog, GoogleCloudRetailV2SetDefaultBranchRequest $postBody, array $optParams = [])

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.

updateAttributesConfig(string $name, GoogleCloudRetailV2AttributesConfig $postBody, array $optParams = [])

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. (catalogs.updateAttributesConfig)

updateCompletionConfig(string $name, GoogleCloudRetailV2CompletionConfig $postBody, array $optParams = [])

Updates the CompletionConfigs. (catalogs.updateCompletionConfig)

Details

GoogleCloudRetailV2CompleteQueryResponse completeQuery(string $catalog, array $optParams = [])

Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature. (catalogs.completeQuery)

Parameters

string $catalog

Required. Catalog for which the completion is performed. Full resource name of catalog, such as projects/locations/global/catalogs/default_catalog.

array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2CompleteQueryResponse

Exceptions

Exception

GoogleLongrunningOperation exportAnalyticsMetrics(string $catalog, GoogleCloudRetailV2ExportAnalyticsMetricsRequest $postBody, array $optParams = [])

Exports analytics metrics. Operation.response is of type ExportAnalyticsMetricsResponse. Operation.metadata is of type ExportMetadata. (catalogs.exportAnalyticsMetrics)

Parameters

string $catalog

Required. Full resource name of the parent catalog. Expected format: projects/locations/catalogs

GoogleCloudRetailV2ExportAnalyticsMetricsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudRetailV2AttributesConfig getAttributesConfig(string $name, array $optParams = [])

Gets an AttributesConfig. (catalogs.getAttributesConfig)

Parameters

string $name

Required. Full AttributesConfig resource name. Format: p rojects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attrib utesConfig

array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2AttributesConfig

Exceptions

Exception

GoogleCloudRetailV2CompletionConfig getCompletionConfig(string $name, array $optParams = [])

Gets a CompletionConfig. (catalogs.getCompletionConfig)

Parameters

string $name

Required. Full CompletionConfig resource name. Format: p rojects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/comple tionConfig

array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2CompletionConfig

Exceptions

Exception

GoogleCloudRetailV2GetDefaultBranchResponse getDefaultBranch(string $catalog, array $optParams = [])

Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.

(catalogs.getDefaultBranch)

Parameters

string $catalog

The parent catalog resource name, such as projects/locations/global/catalogs/default_catalog.

array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2GetDefaultBranchResponse

Exceptions

Exception

GoogleCloudRetailV2ListCatalogsResponse listProjectsLocationsCatalogs(string $parent, array $optParams = [])

Lists all the Catalogs associated with the project.

(catalogs.listProjectsLocationsCatalogs)

Parameters

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.

array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2ListCatalogsResponse

Exceptions

Exception

GoogleCloudRetailV2Catalog patch(string $name, GoogleCloudRetailV2Catalog $postBody, array $optParams = [])

Updates the Catalogs. (catalogs.patch)

Parameters

string $name

Required. Immutable. The fully qualified resource name of the catalog.

GoogleCloudRetailV2Catalog $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2Catalog

Exceptions

Exception

GoogleProtobufEmpty setDefaultBranch(string $catalog, GoogleCloudRetailV2SetDefaultBranchRequest $postBody, array $optParams = [])

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}. (catalogs.setDefaultBranch)

Parameters

string $catalog

Full resource name of the catalog, such as projects/locations/global/catalogs/default_catalog.

GoogleCloudRetailV2SetDefaultBranchRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleProtobufEmpty

Exceptions

Exception

GoogleCloudRetailV2AttributesConfig updateAttributesConfig(string $name, GoogleCloudRetailV2AttributesConfig $postBody, array $optParams = [])

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. (catalogs.updateAttributesConfig)

Parameters

string $name

Required. Immutable. The fully qualified resource name of the attribute config. Format: projects/locations/catalogs/attributesConfig

GoogleCloudRetailV2AttributesConfig $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2AttributesConfig

Exceptions

Exception

GoogleCloudRetailV2CompletionConfig updateCompletionConfig(string $name, GoogleCloudRetailV2CompletionConfig $postBody, array $optParams = [])

Updates the CompletionConfigs. (catalogs.updateCompletionConfig)

Parameters

string $name

Required. Immutable. Fully qualified name projects/locations/catalogs/completionConfig

GoogleCloudRetailV2CompletionConfig $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2CompletionConfig

Exceptions

Exception