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_v2.html">Retail API</a> . <a href="retail_v2.projects.html">projects</a> . <a href="retail_v2.projects.locations.html">locations</a> . <a href="retail_v2.projects.locations.catalogs.html">catalogs</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="retail_v2.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_v2.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_v2.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_v2.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_v2.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;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
218      &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.
219        &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.
220        &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.
221      },
222    },
223  ],
224  &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.
225}</pre>
226</div>
227
228<div class="method">
229    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
230  <pre>Retrieves the next page of results.
231
232Args:
233  previous_request: The request for the previous page. (required)
234  previous_response: The response from the request for the previous page. (required)
235
236Returns:
237  A request object that you can call &#x27;execute()&#x27; on to request the next
238  page. Returns None if there are no more items in the collection.
239    </pre>
240</div>
241
242<div class="method">
243    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
244  <pre>Updates the Catalogs.
245
246Args:
247  name: string, Required. Immutable. The fully qualified resource name of the catalog. (required)
248  body: object, The request body.
249    The object takes the form of:
250
251{ # The catalog configuration.
252  &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.
253  &quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
254  &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.
255    &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.
256    &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.
257  },
258}
259
260  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.
261  x__xgafv: string, V1 error format.
262    Allowed values
263      1 - v1 error format
264      2 - v2 error format
265
266Returns:
267  An object of the form:
268
269    { # The catalog configuration.
270  &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.
271  &quot;name&quot;: &quot;A String&quot;, # Required. Immutable. The fully qualified resource name of the catalog.
272  &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.
273    &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.
274    &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.
275  },
276}</pre>
277</div>
278
279<div class="method">
280    <code class="details" id="setDefaultBranch">setDefaultBranch(catalog, body=None, x__xgafv=None)</code>
281  <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.
282
283Args:
284  catalog: string, Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
285  body: object, The request body.
286    The object takes the form of:
287
288{ # Request message to set a specified branch as new default_branch.
289  &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.
290  &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.
291}
292
293  x__xgafv: string, V1 error format.
294    Allowed values
295      1 - v1 error format
296      2 - v2 error format
297
298Returns:
299  An object of the form:
300
301    { # 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 `{}`.
302}</pre>
303</div>
304
305</body></html>