Skip to content

Commit 741dec8

Browse files
feat(retail): update the api
#### retail:v2 The following keys were added: - resources.projects.resources.locations.resources.catalogs.resources.models.methods.get (Total Keys: 11) - schemas.GoogleCloudRetailV2UserEvent.properties.domain.type (Total Keys: 1) #### retail:v2alpha The following keys were added: - schemas.GoogleCloudRetailV2alphaUserEvent.properties.domain.type (Total Keys: 1) #### retail:v2beta The following keys were added: - schemas.GoogleCloudRetailV2betaUserEvent.properties.domain.type (Total Keys: 1)
1 parent 7f26a31 commit 741dec8

16 files changed

+162
-69
lines changed

docs/dyn/retail_v2.projects.locations.catalogs.branches.products.html

Lines changed: 12 additions & 12 deletions
Large diffs are not rendered by default.

docs/dyn/retail_v2.projects.locations.catalogs.models.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ <h2>Instance Methods</h2>
8383
<p class="toc_element">
8484
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
8585
<p class="firstline">Deletes an existing model.</p>
86+
<p class="toc_element">
87+
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88+
<p class="firstline">Gets a model.</p>
8689
<p class="toc_element">
8790
<code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
8891
<p class="firstline">Lists all the models linked to this event store.</p>
@@ -187,6 +190,44 @@ <h3>Method Details</h3>
187190
}</pre>
188191
</div>
189192

193+
<div class="method">
194+
<code class="details" id="get">get(name, x__xgafv=None)</code>
195+
<pre>Gets a model.
196+
197+
Args:
198+
name: string, Required. The resource name of the Model to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` (required)
199+
x__xgafv: string, V1 error format.
200+
Allowed values
201+
1 - v1 error format
202+
2 - v2 error format
203+
204+
Returns:
205+
An object of the form:
206+
207+
{ # Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.
208+
&quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp the Recommendation Model was created at.
209+
&quot;dataState&quot;: &quot;A String&quot;, # Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.
210+
&quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
211+
&quot;filteringOption&quot;: &quot;A String&quot;, # Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.
212+
&quot;lastTuneTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the latest successful tune finished.
213+
&quot;name&quot;: &quot;A String&quot;, # Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
214+
&quot;optimizationObjective&quot;: &quot;A String&quot;, # Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` =&gt; `ctr` `others-you-may-like` =&gt; `ctr` `frequently-bought-together` =&gt; `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
215+
&quot;periodicTuningState&quot;: &quot;A String&quot;, # Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.
216+
&quot;servingConfigLists&quot;: [ # Output only. The list of valid serving configs associated with the PageOptimizationConfig.
217+
{ # Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.
218+
&quot;servingConfigIds&quot;: [ # Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.
219+
&quot;A String&quot;,
220+
],
221+
},
222+
],
223+
&quot;servingState&quot;: &quot;A String&quot;, # Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
224+
&quot;trainingState&quot;: &quot;A String&quot;, # Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.
225+
&quot;tuningOperation&quot;: &quot;A String&quot;, # Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.
226+
&quot;type&quot;: &quot;A String&quot;, # Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.
227+
&quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.
228+
}</pre>
229+
</div>
230+
190231
<div class="method">
191232
<code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
192233
<pre>Lists all the models linked to this event store.

docs/dyn/retail_v2.projects.locations.catalogs.placements.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ <h3>Method Details</h3>
131131
&quot;selectedPosition&quot;: 42, # End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.
132132
&quot;selectedSuggestion&quot;: &quot;A String&quot;, # End user selected CompleteQueryResponse.CompletionResult.suggestion.
133133
},
134+
&quot;domain&quot;: &quot;A String&quot;, # Represents the domain of the user event, for projects that combine domains. For example: retailer can have events from multiple domains like retailer-main, retailer-baby, retailer-meds, etc. under one project.
134135
&quot;eventTime&quot;: &quot;A String&quot;, # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.
135136
&quot;eventType&quot;: &quot;A String&quot;, # Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
136137
&quot;experimentIds&quot;: [ # A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
@@ -209,7 +210,7 @@ <h3>Method Details</h3>
209210
},
210211
],
211212
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
212-
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This is only available for users who have Retail Search enabled, and it can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs.
213+
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
213214
{ # The inventory information at a place (e.g. a store) identified by a place ID.
214215
&quot;attributes&quot;: { # Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
215216
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
@@ -580,7 +581,7 @@ <h3>Method Details</h3>
580581
},
581582
],
582583
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
583-
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This is only available for users who have Retail Search enabled, and it can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs.
584+
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
584585
{ # The inventory information at a place (e.g. a store) identified by a place ID.
585586
&quot;attributes&quot;: { # Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
586587
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.

docs/dyn/retail_v2.projects.locations.catalogs.servingConfigs.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ <h3>Method Details</h3>
606606
&quot;selectedPosition&quot;: 42, # End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.
607607
&quot;selectedSuggestion&quot;: &quot;A String&quot;, # End user selected CompleteQueryResponse.CompletionResult.suggestion.
608608
},
609+
&quot;domain&quot;: &quot;A String&quot;, # Represents the domain of the user event, for projects that combine domains. For example: retailer can have events from multiple domains like retailer-main, retailer-baby, retailer-meds, etc. under one project.
609610
&quot;eventTime&quot;: &quot;A String&quot;, # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.
610611
&quot;eventType&quot;: &quot;A String&quot;, # Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
611612
&quot;experimentIds&quot;: [ # A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
@@ -684,7 +685,7 @@ <h3>Method Details</h3>
684685
},
685686
],
686687
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
687-
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This is only available for users who have Retail Search enabled, and it can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs.
688+
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
688689
{ # The inventory information at a place (e.g. a store) identified by a place ID.
689690
&quot;attributes&quot;: { # Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
690691
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
@@ -1123,7 +1124,7 @@ <h3>Method Details</h3>
11231124
},
11241125
],
11251126
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
1126-
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This is only available for users who have Retail Search enabled, and it can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs.
1127+
&quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
11271128
{ # The inventory information at a place (e.g. a store) identified by a place ID.
11281129
&quot;attributes&quot;: { # Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
11291130
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.

0 commit comments

Comments
 (0)