1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<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>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="retail_v2alpha.projects.locations.catalogs.branches.html">branches()</a></code>
79</p>
80<p class="firstline">Returns the branches Resource.</p>
81
82<p class="toc_element">
83  <code><a href="retail_v2alpha.projects.locations.catalogs.completionData.html">completionData()</a></code>
84</p>
85<p class="firstline">Returns the completionData Resource.</p>
86
87<p class="toc_element">
88  <code><a href="retail_v2alpha.projects.locations.catalogs.operations.html">operations()</a></code>
89</p>
90<p class="firstline">Returns the operations Resource.</p>
91
92<p class="toc_element">
93  <code><a href="retail_v2alpha.projects.locations.catalogs.placements.html">placements()</a></code>
94</p>
95<p class="firstline">Returns the placements Resource.</p>
96
97<p class="toc_element">
98  <code><a href="retail_v2alpha.projects.locations.catalogs.userEvents.html">userEvents()</a></code>
99</p>
100<p class="firstline">Returns the userEvents Resource.</p>
101
102<p class="toc_element">
103  <code><a href="#close">close()</a></code></p>
104<p class="firstline">Close httplib2 connections.</p>
105<p class="toc_element">
106  <code><a href="#completeQuery">completeQuery(catalog, dataset=None, deviceType=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</a></code></p>
107<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>
108<p class="toc_element">
109  <code><a href="#getDefaultBranch">getDefaultBranch(catalog, x__xgafv=None)</a></code></p>
110<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>
111<p class="toc_element">
112  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
113<p class="firstline">Lists all the Catalogs associated with the project.</p>
114<p class="toc_element">
115  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
116<p class="firstline">Retrieves the next page of results.</p>
117<p class="toc_element">
118  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
119<p class="firstline">Updates the Catalogs.</p>
120<p class="toc_element">
121  <code><a href="#setDefaultBranch">setDefaultBranch(catalog, body=None, x__xgafv=None)</a></code></p>
122<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>
123<h3>Method Details</h3>
124<div class="method">
125    <code class="details" id="close">close()</code>
126  <pre>Close httplib2 connections.</pre>
127</div>
128
129<div class="method">
130    <code class="details" id="completeQuery">completeQuery(catalog, dataset=None, deviceType=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</code>
131  <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.
132
133Args:
134  catalog: string, Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
135  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.
136  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`.
137  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)
138  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.
139  query: string, Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
140  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.
141  x__xgafv: string, V1 error format.
142    Allowed values
143      1 - v1 error format
144      2 - v2 error format
145
146Returns:
147  An object of the form:
148
149    { # Response of the auto-complete query.
150  &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.
151  &quot;completionResults&quot;: [ # Results of the matching suggestions. The result list is ordered and the first result is top suggestion.
152    { # Resource that represents completion results.
153      &quot;attributes&quot;: { # Additional custom attributes ingested through BigQuery.
154        &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
155          &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.
156          &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.
157            3.14,
158          ],
159          &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.
160          &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.
161            &quot;A String&quot;,
162          ],
163        },
164      },
165      &quot;suggestion&quot;: &quot;A String&quot;, # The suggestion for the query.
166    },
167  ],
168  &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.
169    { # Recent search of this user.
170      &quot;recentSearch&quot;: &quot;A String&quot;, # The recent search query.
171    },
172  ],
173}</pre>
174</div>
175
176<div class="method">
177    <code class="details" id="getDefaultBranch">getDefaultBranch(catalog, x__xgafv=None)</code>
178  <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.
179
180Args:
181  catalog: string, The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
182  x__xgafv: string, V1 error format.
183    Allowed values
184      1 - v1 error format
185      2 - v2 error format
186
187Returns:
188  An object of the form:
189
190    { # Response message of CatalogService.GetDefaultBranch.
191  &quot;branch&quot;: &quot;A String&quot;, # Full resource name of the branch id currently set as default branch.
192  &quot;note&quot;: &quot;A String&quot;, # This corresponds to SetDefaultBranchRequest.note field, when this branch was set as default.
193  &quot;setTime&quot;: &quot;A String&quot;, # The time when this branch is set to default.
194}</pre>
195</div>
196
197<div class="method">
198    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
199  <pre>Lists all the Catalogs associated with the project.
200
201Args:
202  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)
203  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.
204  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.
205  x__xgafv: string, V1 error format.
206    Allowed values
207      1 - v1 error format
208      2 - v2 error format
209
210Returns:
211  An object of the form:
212
213    { # Response for CatalogService.ListCatalogs method.
214  &quot;catalogs&quot;: [ # All the customer&#x27;s Catalogs.
215    { # The catalog configuration.
216      &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.
217      &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.
218        &quot;links&quot;: [ # Links between Merchant Center accounts and branches.
219          { # 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.
220            &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.
221            &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.
222              &quot;A String&quot;,
223            ],
224            &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.
225            &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.
226            &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`.
227          },
228        ],
229      },
230      &quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
231      &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.
232        &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.
233        &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.
234      },
235    },
236  ],
237  &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.
238}</pre>
239</div>
240
241<div class="method">
242    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
243  <pre>Retrieves the next page of results.
244
245Args:
246  previous_request: The request for the previous page. (required)
247  previous_response: The response from the request for the previous page. (required)
248
249Returns:
250  A request object that you can call &#x27;execute()&#x27; on to request the next
251  page. Returns None if there are no more items in the collection.
252    </pre>
253</div>
254
255<div class="method">
256    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
257  <pre>Updates the Catalogs.
258
259Args:
260  name: string, Required. Immutable. The fully qualified resource name of the catalog. (required)
261  body: object, The request body.
262    The object takes the form of:
263
264{ # The catalog configuration.
265  &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.
266  &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.
267    &quot;links&quot;: [ # Links between Merchant Center accounts and branches.
268      { # 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.
269        &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.
270        &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.
271          &quot;A String&quot;,
272        ],
273        &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.
274        &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.
275        &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`.
276      },
277    ],
278  },
279  &quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
280  &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.
281    &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.
282    &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.
283  },
284}
285
286  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.
287  x__xgafv: string, V1 error format.
288    Allowed values
289      1 - v1 error format
290      2 - v2 error format
291
292Returns:
293  An object of the form:
294
295    { # The catalog configuration.
296  &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.
297  &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.
298    &quot;links&quot;: [ # Links between Merchant Center accounts and branches.
299      { # 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.
300        &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.
301        &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.
302          &quot;A String&quot;,
303        ],
304        &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.
305        &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.
306        &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`.
307      },
308    ],
309  },
310  &quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
311  &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.
312    &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.
313    &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.
314  },
315}</pre>
316</div>
317
318<div class="method">
319    <code class="details" id="setDefaultBranch">setDefaultBranch(catalog, body=None, x__xgafv=None)</code>
320  <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.
321
322Args:
323  catalog: string, Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
324  body: object, The request body.
325    The object takes the form of:
326
327{ # Request message to set a specified branch as new default_branch.
328  &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.
329  &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.
330}
331
332  x__xgafv: string, V1 error format.
333    Allowed values
334      1 - v1 error format
335      2 - v2 error format
336
337Returns:
338  An object of the form:
339
340    { # 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 `{}`.
341}</pre>
342</div>
343
344</body></html>