blob: c64676120872745b3ab4b9d64db83a475e4dd987 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="retail_v2alpha.html">Retail API</a> . <a href="retail_v2alpha.projects.html">projects</a> . <a href="retail_v2alpha.projects.locations.html">locations</a> . <a href="retail_v2alpha.projects.locations.catalogs.html">catalogs</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="retail_v2alpha.projects.locations.catalogs.branches.html">branches()</a></code>
</p>
<p class="firstline">Returns the branches Resource.</p>
<p class="toc_element">
<code><a href="retail_v2alpha.projects.locations.catalogs.completionData.html">completionData()</a></code>
</p>
<p class="firstline">Returns the completionData Resource.</p>
<p class="toc_element">
<code><a href="retail_v2alpha.projects.locations.catalogs.operations.html">operations()</a></code>
</p>
<p class="firstline">Returns the operations Resource.</p>
<p class="toc_element">
<code><a href="retail_v2alpha.projects.locations.catalogs.placements.html">placements()</a></code>
</p>
<p class="firstline">Returns the placements Resource.</p>
<p class="toc_element">
<code><a href="retail_v2alpha.projects.locations.catalogs.userEvents.html">userEvents()</a></code>
</p>
<p class="firstline">Returns the userEvents Resource.</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#completeQuery">completeQuery(catalog, dataset=None, deviceType=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</a></code></p>
<p class="firstline">Completes the specified prefix with keyword suggestions. 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.</p>
<p class="toc_element">
<code><a href="#getDefaultBranch">getDefaultBranch(catalog, x__xgafv=None)</a></code></p>
<p class="firstline">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. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p>
<p class="toc_element">
<code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists all the Catalogs associated with the project.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates the Catalogs.</p>
<p class="toc_element">
<code><a href="#setDefaultBranch">setDefaultBranch(catalog, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">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. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="completeQuery">completeQuery(catalog, dataset=None, deviceType=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</code>
<pre>Completes the specified prefix with keyword suggestions. 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.
Args:
catalog: string, Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
dataset: string, Determines which dataset to use for fetching completion. &quot;user-data&quot; will use the imported dataset through CompletionService.ImportCompletionData. &quot;cloud-retail&quot; will use the dataset generated by cloud retail based on user events. If leave empty, it will use the &quot;user-data&quot;. Current supported values: * user-data * cloud-retail This option requires additional allowlisting. Before using cloud-retail, contact Cloud Retail support team first.
deviceType: string, 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`.
languageCodes: string, The list of languages of the query. This is the BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of allowed characters is 255. Only &quot;en-US&quot; is currently supported. (repeated)
maxSuggestions: integer, Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.
query: string, Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
visitorId: string, 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.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response of the auto-complete query.
&quot;attributionToken&quot;: &quot;A String&quot;, # A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance.
&quot;completionResults&quot;: [ # Results of the matching suggestions. The result list is ordered and the first result is top suggestion.
{ # Resource that represents completion results.
&quot;attributes&quot;: { # Additional custom attributes ingested through BigQuery.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;suggestion&quot;: &quot;A String&quot;, # The suggestion for the query.
},
],
&quot;recentSearchResults&quot;: [ # Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. Contact Retail Search support team if you are interested in enabling it. This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * They are ordered from latest to oldest. * They are matched with CompleteQueryRequest.query case insensitively. * They are transformed to lower cases. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.
{ # Recent search of this user.
&quot;recentSearch&quot;: &quot;A String&quot;, # The recent search query.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="getDefaultBranch">getDefaultBranch(catalog, x__xgafv=None)</code>
<pre>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. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.
Args:
catalog: string, The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message of CatalogService.GetDefaultBranch.
&quot;branch&quot;: &quot;A String&quot;, # Full resource name of the branch id currently set as default branch.
&quot;note&quot;: &quot;A String&quot;, # This corresponds to SetDefaultBranchRequest.note field, when this branch was set as default.
&quot;setTime&quot;: &quot;A String&quot;, # The time when this branch is set to default.
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Lists all the Catalogs associated with the project.
Args:
parent: string, 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. (required)
pageSize: integer, Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned.
pageToken: string, A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response for CatalogService.ListCatalogs method.
&quot;catalogs&quot;: [ # All the customer&#x27;s Catalogs.
{ # The catalog configuration.
&quot;displayName&quot;: &quot;A String&quot;, # Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;merchantCenterLinkingConfig&quot;: { # Configures Merchant Center linking. Links contained in the config will be used to sync data from a Merchant Center account to a Cloud Retail branch. # The Merchant Center linking configuration. Once a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the merchant center account in order to make changes to this field.
&quot;links&quot;: [ # Links between Merchant Center accounts and branches.
{ # Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.
&quot;branchId&quot;: &quot;A String&quot;, # The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won&#x27;t change the linked branch here. A single branch id can only have one linked merchant center account id.
&quot;destinations&quot;: [ # String representing the destination to import for, all if left empty. List of possible values can be found here. [https://support.google.com/merchants/answer/7501026] List of allowed string values: &quot;Shopping_ads&quot;, &quot;Buy_on_google_listings&quot;, &quot;Display_ads&quot;, &quot;Local_inventory _ads&quot;, &quot;Free_listings&quot;, &quot;Free_local_listings&quot; NOTE: The string values are case sensitive.
&quot;A String&quot;,
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed.
&quot;merchantCenterAccountId&quot;: &quot;A String&quot;, # Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.
&quot;regionCode&quot;: &quot;A String&quot;, # Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the `region` tag. [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry]. If left blank no region filtering will be performed. Ex. `US`.
},
],
},
&quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
&quot;productLevelConfig&quot;: { # Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made. # Required. The product level configuration.
&quot;ingestionProductType&quot;: &quot;A String&quot;, # The type of Products allowed to be ingested into the catalog. Acceptable values are: * `primary` (default): You can ingest Products of all types. When ingesting a Product, its type will default to Product.Type.PRIMARY if unset. * `variant`: You can only ingest Product.Type.VARIANT Products. This means Product.primary_product_id cannot be empty. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `variant` and merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error is returned. See [Using product levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) for more details.
&quot;merchantCenterProductIdField&quot;: &quot;A String&quot;, # Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-center-products-schema) should be imported as Product.id. Acceptable values are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail API will choose one item from the ones with the same `itemGroupId`, and use it to represent the item group. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned. See [Using product levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) for more details.
},
},
],
&quot;nextPageToken&quot;: &quot;A String&quot;, # A token that can be sent as ListCatalogsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
<pre>Updates the Catalogs.
Args:
name: string, Required. Immutable. The fully qualified resource name of the catalog. (required)
body: object, The request body.
The object takes the form of:
{ # The catalog configuration.
&quot;displayName&quot;: &quot;A String&quot;, # Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;merchantCenterLinkingConfig&quot;: { # Configures Merchant Center linking. Links contained in the config will be used to sync data from a Merchant Center account to a Cloud Retail branch. # The Merchant Center linking configuration. Once a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the merchant center account in order to make changes to this field.
&quot;links&quot;: [ # Links between Merchant Center accounts and branches.
{ # Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.
&quot;branchId&quot;: &quot;A String&quot;, # The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won&#x27;t change the linked branch here. A single branch id can only have one linked merchant center account id.
&quot;destinations&quot;: [ # String representing the destination to import for, all if left empty. List of possible values can be found here. [https://support.google.com/merchants/answer/7501026] List of allowed string values: &quot;Shopping_ads&quot;, &quot;Buy_on_google_listings&quot;, &quot;Display_ads&quot;, &quot;Local_inventory _ads&quot;, &quot;Free_listings&quot;, &quot;Free_local_listings&quot; NOTE: The string values are case sensitive.
&quot;A String&quot;,
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed.
&quot;merchantCenterAccountId&quot;: &quot;A String&quot;, # Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.
&quot;regionCode&quot;: &quot;A String&quot;, # Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the `region` tag. [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry]. If left blank no region filtering will be performed. Ex. `US`.
},
],
},
&quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
&quot;productLevelConfig&quot;: { # Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made. # Required. The product level configuration.
&quot;ingestionProductType&quot;: &quot;A String&quot;, # The type of Products allowed to be ingested into the catalog. Acceptable values are: * `primary` (default): You can ingest Products of all types. When ingesting a Product, its type will default to Product.Type.PRIMARY if unset. * `variant`: You can only ingest Product.Type.VARIANT Products. This means Product.primary_product_id cannot be empty. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `variant` and merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error is returned. See [Using product levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) for more details.
&quot;merchantCenterProductIdField&quot;: &quot;A String&quot;, # Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-center-products-schema) should be imported as Product.id. Acceptable values are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail API will choose one item from the ones with the same `itemGroupId`, and use it to represent the item group. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned. See [Using product levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) for more details.
},
}
updateMask: string, Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The catalog configuration.
&quot;displayName&quot;: &quot;A String&quot;, # Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;merchantCenterLinkingConfig&quot;: { # Configures Merchant Center linking. Links contained in the config will be used to sync data from a Merchant Center account to a Cloud Retail branch. # The Merchant Center linking configuration. Once a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the merchant center account in order to make changes to this field.
&quot;links&quot;: [ # Links between Merchant Center accounts and branches.
{ # Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.
&quot;branchId&quot;: &quot;A String&quot;, # The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won&#x27;t change the linked branch here. A single branch id can only have one linked merchant center account id.
&quot;destinations&quot;: [ # String representing the destination to import for, all if left empty. List of possible values can be found here. [https://support.google.com/merchants/answer/7501026] List of allowed string values: &quot;Shopping_ads&quot;, &quot;Buy_on_google_listings&quot;, &quot;Display_ads&quot;, &quot;Local_inventory _ads&quot;, &quot;Free_listings&quot;, &quot;Free_local_listings&quot; NOTE: The string values are case sensitive.
&quot;A String&quot;,
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed.
&quot;merchantCenterAccountId&quot;: &quot;A String&quot;, # Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.
&quot;regionCode&quot;: &quot;A String&quot;, # Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the `region` tag. [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry]. If left blank no region filtering will be performed. Ex. `US`.
},
],
},
&quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
&quot;productLevelConfig&quot;: { # Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made. # Required. The product level configuration.
&quot;ingestionProductType&quot;: &quot;A String&quot;, # The type of Products allowed to be ingested into the catalog. Acceptable values are: * `primary` (default): You can ingest Products of all types. When ingesting a Product, its type will default to Product.Type.PRIMARY if unset. * `variant`: You can only ingest Product.Type.VARIANT Products. This means Product.primary_product_id cannot be empty. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `variant` and merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error is returned. See [Using product levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) for more details.
&quot;merchantCenterProductIdField&quot;: &quot;A String&quot;, # Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-center-products-schema) should be imported as Product.id. Acceptable values are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail API will choose one item from the ones with the same `itemGroupId`, and use it to represent the item group. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned. See [Using product levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) for more details.
},
}</pre>
</div>
<div class="method">
<code class="details" id="setDefaultBranch">setDefaultBranch(catalog, body=None, x__xgafv=None)</code>
<pre>Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using &quot;default_branch&quot; 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. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.
Args:
catalog: string, Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
body: object, The request body.
The object takes the form of:
{ # Request message to set a specified branch as new default_branch.
&quot;branchId&quot;: &quot;A String&quot;, # The final component of the resource name of a branch. This field must be one of &quot;0&quot;, &quot;1&quot; or &quot;2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;note&quot;: &quot;A String&quot;, # Some note on this request, this can be retrieved by CatalogService.GetDefaultBranch before next valid default branch set occurs. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}</pre>
</div>
</body></html>