diff --git a/Retail/metadata/V2/Catalog.php b/Retail/metadata/V2/Catalog.php
index fbd9a5784079..d54fd9e35e0c 100644
Binary files a/Retail/metadata/V2/Catalog.php and b/Retail/metadata/V2/Catalog.php differ
diff --git a/Retail/metadata/V2/PredictionService.php b/Retail/metadata/V2/PredictionService.php
index 147d2b169cc5..d7aa7efec903 100644
--- a/Retail/metadata/V2/PredictionService.php
+++ b/Retail/metadata/V2/PredictionService.php
@@ -17,12 +17,13 @@ public static function initOnce() {
\GPBMetadata\Google\Api\Annotations::initOnce();
\GPBMetadata\Google\Api\Client::initOnce();
\GPBMetadata\Google\Api\FieldBehavior::initOnce();
+ \GPBMetadata\Google\Api\Resource::initOnce();
\GPBMetadata\Google\Cloud\Retail\V2\UserEvent::initOnce();
\GPBMetadata\Google\Protobuf\Struct::initOnce();
$pool->internalAddGeneratedFile(
'
-¥
-/google/cloud/retail/v2/prediction_service.protogoogle.cloud.retail.v2google/api/client.protogoogle/api/field_behavior.proto\'google/cloud/retail/v2/user_event.protogoogle/protobuf/struct.proto"´
+À
+/google/cloud/retail/v2/prediction_service.protogoogle.cloud.retail.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto\'google/cloud/retail/v2/user_event.protogoogle/protobuf/struct.proto"´
PredictRequest
placement ( BàA:
diff --git a/Retail/metadata/V2/Product.php b/Retail/metadata/V2/Product.php
index bffb4206edb6..d367e6be9ff1 100644
Binary files a/Retail/metadata/V2/Product.php and b/Retail/metadata/V2/Product.php differ
diff --git a/Retail/metadata/V2/ServingConfig.php b/Retail/metadata/V2/ServingConfig.php
index dda88421af70..91382d0a9c8c 100644
Binary files a/Retail/metadata/V2/ServingConfig.php and b/Retail/metadata/V2/ServingConfig.php differ
diff --git a/Retail/metadata/V2/UserEventService.php b/Retail/metadata/V2/UserEventService.php
index 96e71278e466..2876e5a1e422 100644
Binary files a/Retail/metadata/V2/UserEventService.php and b/Retail/metadata/V2/UserEventService.php differ
diff --git a/Retail/samples/V2/CatalogServiceClient/get_completion_config.php b/Retail/samples/V2/CatalogServiceClient/get_completion_config.php
index 9895bbf057d6..02bec46e5d2c 100644
--- a/Retail/samples/V2/CatalogServiceClient/get_completion_config.php
+++ b/Retail/samples/V2/CatalogServiceClient/get_completion_config.php
@@ -31,7 +31,7 @@
* Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].
*
* @param string $formattedName Full CompletionConfig resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
* Please see {@see CatalogServiceClient::completionConfigName()} for help formatting this field.
*/
function get_completion_config_sample(string $formattedName): void
diff --git a/Retail/samples/V2/CompletionServiceClient/complete_query.php b/Retail/samples/V2/CompletionServiceClient/complete_query.php
index 868f6a5468b7..ecb18dd28bcc 100644
--- a/Retail/samples/V2/CompletionServiceClient/complete_query.php
+++ b/Retail/samples/V2/CompletionServiceClient/complete_query.php
@@ -31,7 +31,7 @@
* Completes the specified prefix with keyword suggestions.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $formattedCatalog Catalog for which the completion is performed.
*
diff --git a/Retail/samples/V2/CompletionServiceClient/import_completion_data.php b/Retail/samples/V2/CompletionServiceClient/import_completion_data.php
index cb1fa173a23f..3323d995b203 100644
--- a/Retail/samples/V2/CompletionServiceClient/import_completion_data.php
+++ b/Retail/samples/V2/CompletionServiceClient/import_completion_data.php
@@ -40,7 +40,7 @@
* are indexed successfully and ready for serving. The process takes hours.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $formattedParent The catalog which the suggestions dataset belongs to.
*
diff --git a/Retail/samples/V2/PredictionServiceClient/predict.php b/Retail/samples/V2/PredictionServiceClient/predict.php
index c4f51084959e..516bb587bb3a 100644
--- a/Retail/samples/V2/PredictionServiceClient/predict.php
+++ b/Retail/samples/V2/PredictionServiceClient/predict.php
@@ -40,7 +40,7 @@
* The ID of the Recommendations AI serving config or placement.
* Before you can request predictions from your model, you must create at
* least one serving config or placement for it. For more information, see
- * [Managing serving configurations]
+ * [Manage serving configs]
* (https://cloud.google.com/retail/docs/manage-configs).
*
* The full list of available serving configs can be seen at
diff --git a/Retail/samples/V2/ProductServiceClient/add_fulfillment_places.php b/Retail/samples/V2/ProductServiceClient/add_fulfillment_places.php
index 3bf42ac8b276..2a59b939c03f 100644
--- a/Retail/samples/V2/ProductServiceClient/add_fulfillment_places.php
+++ b/Retail/samples/V2/ProductServiceClient/add_fulfillment_places.php
@@ -43,15 +43,17 @@
* or
* [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $formattedProduct Full resource name of [Product][google.cloud.retail.v2.Product],
* such as
diff --git a/Retail/samples/V2/ProductServiceClient/add_local_inventories.php b/Retail/samples/V2/ProductServiceClient/add_local_inventories.php
index 942d8192569c..73ece4de4d8a 100644
--- a/Retail/samples/V2/ProductServiceClient/add_local_inventories.php
+++ b/Retail/samples/V2/ProductServiceClient/add_local_inventories.php
@@ -51,15 +51,17 @@
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
* has no effect on local inventories.
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $formattedProduct Full resource name of [Product][google.cloud.retail.v2.Product],
* such as
diff --git a/Retail/samples/V2/ProductServiceClient/remove_fulfillment_places.php b/Retail/samples/V2/ProductServiceClient/remove_fulfillment_places.php
index 7b6ef9e237fa..a29b24e8d466 100644
--- a/Retail/samples/V2/ProductServiceClient/remove_fulfillment_places.php
+++ b/Retail/samples/V2/ProductServiceClient/remove_fulfillment_places.php
@@ -43,15 +43,17 @@
* or
* [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $formattedProduct Full resource name of [Product][google.cloud.retail.v2.Product],
* such as
diff --git a/Retail/samples/V2/ProductServiceClient/remove_local_inventories.php b/Retail/samples/V2/ProductServiceClient/remove_local_inventories.php
index 0ef15b603ba0..741a4b81108f 100644
--- a/Retail/samples/V2/ProductServiceClient/remove_local_inventories.php
+++ b/Retail/samples/V2/ProductServiceClient/remove_local_inventories.php
@@ -48,15 +48,17 @@
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
* has no effect on local inventories.
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $formattedProduct Full resource name of [Product][google.cloud.retail.v2.Product],
* such as
diff --git a/Retail/samples/V2/ProductServiceClient/set_inventory.php b/Retail/samples/V2/ProductServiceClient/set_inventory.php
index d93d801c74a7..78fd2de5df98 100644
--- a/Retail/samples/V2/ProductServiceClient/set_inventory.php
+++ b/Retail/samples/V2/ProductServiceClient/set_inventory.php
@@ -37,9 +37,9 @@
*
* This process is asynchronous and does not require the
* [Product][google.cloud.retail.v2.Product] to exist before updating
- * fulfillment information. If the request is valid, the update will be
- * enqueued and processed downstream. As a consequence, when a response is
- * returned, updates are not immediately manifested in the
+ * fulfillment information. If the request is valid, the update is enqueued
+ * and processed downstream. As a consequence, when a response is returned,
+ * updates are not immediately manifested in the
* [Product][google.cloud.retail.v2.Product] queried by
* [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
* or
@@ -49,10 +49,10 @@
* [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
* and
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct],
- * the specified inventory field value(s) will overwrite any existing value(s)
+ * the specified inventory field value(s) overwrite any existing value(s)
* while ignoring the last update time for this field. Furthermore, the last
- * update time for the specified inventory fields will be overwritten to the
- * time of the
+ * update times for the specified inventory fields are overwritten by the
+ * times of the
* [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
* or
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
@@ -60,11 +60,11 @@
*
* If no inventory fields are set in
* [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product],
- * then any pre-existing inventory information for this product will be used.
+ * then any pre-existing inventory information for this product is used.
*
* If no inventory fields are set in
* [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask],
- * then any existing inventory information will be preserved.
+ * then any existing inventory information is preserved.
*
* Pre-existing inventory information can only be updated with
* [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory],
@@ -72,15 +72,17 @@
* and
* [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s is obsolete after
+ * one day, and the [GetOperation][google.longrunning.Operations.GetOperation]
+ * API returns `NOT_FOUND` afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates are not marked as [done][google.longrunning.Operation.done] until
+ * they are obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $inventoryTitle Product title.
*
diff --git a/Retail/samples/V2/SearchServiceClient/search.php b/Retail/samples/V2/SearchServiceClient/search.php
index 27ac5c24e245..3be7b67bb2e8 100644
--- a/Retail/samples/V2/SearchServiceClient/search.php
+++ b/Retail/samples/V2/SearchServiceClient/search.php
@@ -32,13 +32,13 @@
* Performs a search.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* @param string $placement The resource name of the Retail Search serving config, such as
* `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
* or the name of the legacy placement resource, such as
* `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
- * This field is used to identify the serving configuration name and the set
+ * This field is used to identify the serving config name and the set
* of models that will be used to make the search.
* @param string $visitorId A unique identifier for tracking visitors. For example, this
* could be implemented with an HTTP cookie, which should be able to uniquely
diff --git a/Retail/samples/V2/ServingConfigServiceClient/add_control.php b/Retail/samples/V2/ServingConfigServiceClient/add_control.php
index 130231860069..c8bea0886720 100644
--- a/Retail/samples/V2/ServingConfigServiceClient/add_control.php
+++ b/Retail/samples/V2/ServingConfigServiceClient/add_control.php
@@ -37,7 +37,7 @@
* number of control allowed for that type of control.
*
* @param string $formattedServingConfig The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* Please see {@see ServingConfigServiceClient::servingConfigName()} for help formatting this field.
* @param string $controlId The id of the control to apply. Assumed to be in the same catalog
* as the serving config - if id is not found a NOT_FOUND error is returned.
diff --git a/Retail/samples/V2/ServingConfigServiceClient/delete_serving_config.php b/Retail/samples/V2/ServingConfigServiceClient/delete_serving_config.php
index 79b981b85ff0..b6b694eaa749 100644
--- a/Retail/samples/V2/ServingConfigServiceClient/delete_serving_config.php
+++ b/Retail/samples/V2/ServingConfigServiceClient/delete_serving_config.php
@@ -32,7 +32,7 @@
* Returns a NotFound error if the ServingConfig does not exist.
*
* @param string $formattedName The resource name of the ServingConfig to delete. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* Please see {@see ServingConfigServiceClient::servingConfigName()} for help formatting this field.
*/
function delete_serving_config_sample(string $formattedName): void
diff --git a/Retail/samples/V2/ServingConfigServiceClient/get_serving_config.php b/Retail/samples/V2/ServingConfigServiceClient/get_serving_config.php
index b4303ecda111..cdbc46128fa8 100644
--- a/Retail/samples/V2/ServingConfigServiceClient/get_serving_config.php
+++ b/Retail/samples/V2/ServingConfigServiceClient/get_serving_config.php
@@ -33,7 +33,7 @@
* Returns a NotFound error if the ServingConfig does not exist.
*
* @param string $formattedName The resource name of the ServingConfig to get. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* Please see {@see ServingConfigServiceClient::servingConfigName()} for help formatting this field.
*/
function get_serving_config_sample(string $formattedName): void
diff --git a/Retail/samples/V2/ServingConfigServiceClient/list_serving_configs.php b/Retail/samples/V2/ServingConfigServiceClient/list_serving_configs.php
index 4c24795793a4..797217af9395 100644
--- a/Retail/samples/V2/ServingConfigServiceClient/list_serving_configs.php
+++ b/Retail/samples/V2/ServingConfigServiceClient/list_serving_configs.php
@@ -32,7 +32,7 @@
* Lists all ServingConfigs linked to this catalog.
*
* @param string $formattedParent The catalog resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
* Please see {@see ServingConfigServiceClient::catalogName()} for help formatting this field.
*/
function list_serving_configs_sample(string $formattedParent): void
diff --git a/Retail/samples/V2/ServingConfigServiceClient/remove_control.php b/Retail/samples/V2/ServingConfigServiceClient/remove_control.php
index 187383ededd5..8cae0ab458d7 100644
--- a/Retail/samples/V2/ServingConfigServiceClient/remove_control.php
+++ b/Retail/samples/V2/ServingConfigServiceClient/remove_control.php
@@ -34,7 +34,7 @@
* ServingConfig.
*
* @param string $formattedServingConfig The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* Please see {@see ServingConfigServiceClient::servingConfigName()} for help formatting this field.
* @param string $controlId The id of the control to apply. Assumed to be in the same catalog
* as the serving config.
diff --git a/Retail/samples/V2/UserEventServiceClient/rejoin_user_events.php b/Retail/samples/V2/UserEventServiceClient/rejoin_user_events.php
index 33b2f5d11091..010689d371b1 100644
--- a/Retail/samples/V2/UserEventServiceClient/rejoin_user_events.php
+++ b/Retail/samples/V2/UserEventServiceClient/rejoin_user_events.php
@@ -30,14 +30,14 @@
use Google\Rpc\Status;
/**
- * Starts a user event rejoin operation with latest product catalog. Events
- * will not be annotated with detailed product information if product is
- * missing from the catalog at the time the user event is ingested, and these
- * events are stored as unjoined events with a limited usage on training and
- * serving. This method can be used to start a join operation on specified
- * events with latest version of product catalog. It can also be used to
- * correct events joined with the wrong product catalog. A rejoin operation
- * can take hours or days to complete.
+ * Starts a user-event rejoin operation with latest product catalog. Events
+ * are not annotated with detailed product information for products that are
+ * missing from the catalog when the user event is ingested. These
+ * events are stored as unjoined events with limited usage on training and
+ * serving. You can use this method to start a join operation on specified
+ * events with the latest version of product catalog. You can also use this
+ * method to correct events joined with the wrong product catalog. A rejoin
+ * operation can take hours or days to complete.
*
* @param string $parent The parent catalog resource name, such as
* `projects/1234/locations/global/catalogs/default_catalog`.
diff --git a/Retail/src/V2/AddControlRequest.php b/Retail/src/V2/AddControlRequest.php
index 33d0a79cbc1a..428f56625901 100644
--- a/Retail/src/V2/AddControlRequest.php
+++ b/Retail/src/V2/AddControlRequest.php
@@ -17,7 +17,7 @@ class AddControlRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -38,7 +38,7 @@ class AddControlRequest extends \Google\Protobuf\Internal\Message
*
* @type string $serving_config
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* @type string $control_id
* Required. The id of the control to apply. Assumed to be in the same catalog
* as the serving config - if id is not found a NOT_FOUND error is returned.
@@ -51,7 +51,7 @@ public function __construct($data = NULL) {
/**
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -63,7 +63,7 @@ public function getServingConfig()
/**
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/Retail/src/V2/CatalogAttribute.php b/Retail/src/V2/CatalogAttribute.php
index 58ce9496435d..c0cf26464ec8 100644
--- a/Retail/src/V2/CatalogAttribute.php
+++ b/Retail/src/V2/CatalogAttribute.php
@@ -41,13 +41,13 @@ class CatalogAttribute extends \Google\Protobuf\Internal\Message
* [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
* APIs. This field is `False` for pre-loaded
* [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s.
- * Only pre-loaded
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * neither in use by products nor predefined can be deleted.
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * either in use by products or are predefined cannot be deleted; however,
- * their configuration properties will reset to default values upon removal
- * request.
+ * Only pre-loaded [catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in
+ * use by products nor predefined can be deleted. [Catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are
+ * either in use by products or are predefined attributes cannot be deleted;
+ * however, their configuration properties will reset to default values upon
+ * removal request.
* After catalog changes, it takes about 10 minutes for this field to update.
*
* Generated from protobuf field bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -66,6 +66,7 @@ class CatalogAttribute extends \Google\Protobuf\Internal\Message
* is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
* are indexed so that it can be filtered, faceted, or boosted in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5;
*/
@@ -75,6 +76,7 @@ class CatalogAttribute extends \Google\Protobuf\Internal\Message
* facet. Could only be DYNAMIC_FACETABLE_DISABLED if
* [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option]
* is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6;
*/
@@ -89,10 +91,26 @@ class CatalogAttribute extends \Google\Protobuf\Internal\Message
* will not be searchable by text queries in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as
* there are no text values associated to numerical attributes.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7;
*/
private $searchable_option = 0;
+ /**
+ * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+ * This property only applies to textual custom attributes and requires
+ * indexable set to enabled to enable exact-searchable.
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11;
+ */
+ private $exact_searchable_option = 0;
+ /**
+ * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
+ * results.
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.RetrievableOption retrievable_option = 12;
+ */
+ private $retrievable_option = 0;
/**
* Constructor.
@@ -121,13 +139,13 @@ class CatalogAttribute extends \Google\Protobuf\Internal\Message
* [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
* APIs. This field is `False` for pre-loaded
* [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s.
- * Only pre-loaded
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * neither in use by products nor predefined can be deleted.
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * either in use by products or are predefined cannot be deleted; however,
- * their configuration properties will reset to default values upon removal
- * request.
+ * Only pre-loaded [catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in
+ * use by products nor predefined can be deleted. [Catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are
+ * either in use by products or are predefined attributes cannot be deleted;
+ * however, their configuration properties will reset to default values upon
+ * removal request.
* After catalog changes, it takes about 10 minutes for this field to update.
* @type int $type
* Output only. The type of this attribute. This is derived from the attribute
@@ -138,11 +156,13 @@ class CatalogAttribute extends \Google\Protobuf\Internal\Message
* is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
* are indexed so that it can be filtered, faceted, or boosted in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * Must be specified, otherwise throws INVALID_FORMAT error.
* @type int $dynamic_facetable_option
* If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
* facet. Could only be DYNAMIC_FACETABLE_DISABLED if
* [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option]
* is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
* @type int $searchable_option
* When
* [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level]
@@ -153,6 +173,14 @@ class CatalogAttribute extends \Google\Protobuf\Internal\Message
* will not be searchable by text queries in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as
* there are no text values associated to numerical attributes.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
+ * @type int $exact_searchable_option
+ * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+ * This property only applies to textual custom attributes and requires
+ * indexable set to enabled to enable exact-searchable.
+ * @type int $retrievable_option
+ * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
+ * results.
* }
*/
public function __construct($data = NULL) {
@@ -211,13 +239,13 @@ public function setKey($var)
* [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
* APIs. This field is `False` for pre-loaded
* [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s.
- * Only pre-loaded
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * neither in use by products nor predefined can be deleted.
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * either in use by products or are predefined cannot be deleted; however,
- * their configuration properties will reset to default values upon removal
- * request.
+ * Only pre-loaded [catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in
+ * use by products nor predefined can be deleted. [Catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are
+ * either in use by products or are predefined attributes cannot be deleted;
+ * however, their configuration properties will reset to default values upon
+ * removal request.
* After catalog changes, it takes about 10 minutes for this field to update.
*
* Generated from protobuf field bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -241,13 +269,13 @@ public function getInUse()
* [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
* APIs. This field is `False` for pre-loaded
* [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s.
- * Only pre-loaded
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * neither in use by products nor predefined can be deleted.
- * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
- * either in use by products or are predefined cannot be deleted; however,
- * their configuration properties will reset to default values upon removal
- * request.
+ * Only pre-loaded [catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in
+ * use by products nor predefined can be deleted. [Catalog
+ * attributes][google.cloud.retail.v2.CatalogAttribute] that are
+ * either in use by products or are predefined attributes cannot be deleted;
+ * however, their configuration properties will reset to default values upon
+ * removal request.
* After catalog changes, it takes about 10 minutes for this field to update.
*
* Generated from protobuf field bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -296,6 +324,7 @@ public function setType($var)
* is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
* are indexed so that it can be filtered, faceted, or boosted in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5;
* @return int
@@ -311,6 +340,7 @@ public function getIndexableOption()
* is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
* are indexed so that it can be filtered, faceted, or boosted in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5;
* @param int $var
@@ -329,6 +359,7 @@ public function setIndexableOption($var)
* facet. Could only be DYNAMIC_FACETABLE_DISABLED if
* [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option]
* is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6;
* @return int
@@ -343,6 +374,7 @@ public function getDynamicFacetableOption()
* facet. Could only be DYNAMIC_FACETABLE_DISABLED if
* [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option]
* is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6;
* @param int $var
@@ -366,6 +398,7 @@ public function setDynamicFacetableOption($var)
* will not be searchable by text queries in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as
* there are no text values associated to numerical attributes.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7;
* @return int
@@ -385,6 +418,7 @@ public function getSearchableOption()
* will not be searchable by text queries in
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as
* there are no text values associated to numerical attributes.
+ * Must be specified, otherwise throws INVALID_FORMAT error.
*
* Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7;
* @param int $var
@@ -398,5 +432,63 @@ public function setSearchableOption($var)
return $this;
}
+ /**
+ * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+ * This property only applies to textual custom attributes and requires
+ * indexable set to enabled to enable exact-searchable.
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11;
+ * @return int
+ */
+ public function getExactSearchableOption()
+ {
+ return $this->exact_searchable_option;
+ }
+
+ /**
+ * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+ * This property only applies to textual custom attributes and requires
+ * indexable set to enabled to enable exact-searchable.
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11;
+ * @param int $var
+ * @return $this
+ */
+ public function setExactSearchableOption($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Retail\V2\CatalogAttribute\ExactSearchableOption::class);
+ $this->exact_searchable_option = $var;
+
+ return $this;
+ }
+
+ /**
+ * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
+ * results.
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.RetrievableOption retrievable_option = 12;
+ * @return int
+ */
+ public function getRetrievableOption()
+ {
+ return $this->retrievable_option;
+ }
+
+ /**
+ * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
+ * results.
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.CatalogAttribute.RetrievableOption retrievable_option = 12;
+ * @param int $var
+ * @return $this
+ */
+ public function setRetrievableOption($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Retail\V2\CatalogAttribute\RetrievableOption::class);
+ $this->retrievable_option = $var;
+
+ return $this;
+ }
+
}
diff --git a/Retail/src/V2/CatalogAttribute/DynamicFacetableOption.php b/Retail/src/V2/CatalogAttribute/DynamicFacetableOption.php
index de886729005d..074056a11640 100644
--- a/Retail/src/V2/CatalogAttribute/DynamicFacetableOption.php
+++ b/Retail/src/V2/CatalogAttribute/DynamicFacetableOption.php
@@ -14,8 +14,7 @@
class DynamicFacetableOption
{
/**
- * Value used when unset. Defaults to
- * [DYNAMIC_FACETABLE_ENABLED][google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED].
+ * Value used when unset.
*
* Generated from protobuf enum DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0;
*/
diff --git a/Retail/src/V2/CatalogAttribute/ExactSearchableOption.php b/Retail/src/V2/CatalogAttribute/ExactSearchableOption.php
new file mode 100644
index 000000000000..4735f3a12c7a
--- /dev/null
+++ b/Retail/src/V2/CatalogAttribute/ExactSearchableOption.php
@@ -0,0 +1,63 @@
+google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption
+ */
+class ExactSearchableOption
+{
+ /**
+ * Value used when unset. Defaults to
+ * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED].
+ *
+ * Generated from protobuf enum EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0;
+ */
+ const EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0;
+ /**
+ * Exact searchable option enabled for an attribute.
+ *
+ * Generated from protobuf enum EXACT_SEARCHABLE_ENABLED = 1;
+ */
+ const EXACT_SEARCHABLE_ENABLED = 1;
+ /**
+ * Exact searchable option disabled for an attribute.
+ *
+ * Generated from protobuf enum EXACT_SEARCHABLE_DISABLED = 2;
+ */
+ const EXACT_SEARCHABLE_DISABLED = 2;
+
+ private static $valueToName = [
+ self::EXACT_SEARCHABLE_OPTION_UNSPECIFIED => 'EXACT_SEARCHABLE_OPTION_UNSPECIFIED',
+ self::EXACT_SEARCHABLE_ENABLED => 'EXACT_SEARCHABLE_ENABLED',
+ self::EXACT_SEARCHABLE_DISABLED => 'EXACT_SEARCHABLE_DISABLED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/Retail/src/V2/CatalogAttribute/IndexableOption.php b/Retail/src/V2/CatalogAttribute/IndexableOption.php
index 8874093b934f..01f913950bc3 100644
--- a/Retail/src/V2/CatalogAttribute/IndexableOption.php
+++ b/Retail/src/V2/CatalogAttribute/IndexableOption.php
@@ -14,8 +14,7 @@
class IndexableOption
{
/**
- * Value used when unset. Defaults to
- * [INDEXABLE_ENABLED][google.cloud.retail.v2.CatalogAttribute.IndexableOption.INDEXABLE_ENABLED].
+ * Value used when unset.
*
* Generated from protobuf enum INDEXABLE_OPTION_UNSPECIFIED = 0;
*/
diff --git a/Retail/src/V2/CatalogAttribute/RetrievableOption.php b/Retail/src/V2/CatalogAttribute/RetrievableOption.php
new file mode 100644
index 000000000000..c0abbbcd3bb6
--- /dev/null
+++ b/Retail/src/V2/CatalogAttribute/RetrievableOption.php
@@ -0,0 +1,63 @@
+google.cloud.retail.v2.CatalogAttribute.RetrievableOption
+ */
+class RetrievableOption
+{
+ /**
+ * Value used when unset. Defaults to
+ * [RETRIEVABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED].
+ *
+ * Generated from protobuf enum RETRIEVABLE_OPTION_UNSPECIFIED = 0;
+ */
+ const RETRIEVABLE_OPTION_UNSPECIFIED = 0;
+ /**
+ * Retrievable option enabled for an attribute.
+ *
+ * Generated from protobuf enum RETRIEVABLE_ENABLED = 1;
+ */
+ const RETRIEVABLE_ENABLED = 1;
+ /**
+ * Retrievable option disabled for an attribute.
+ *
+ * Generated from protobuf enum RETRIEVABLE_DISABLED = 2;
+ */
+ const RETRIEVABLE_DISABLED = 2;
+
+ private static $valueToName = [
+ self::RETRIEVABLE_OPTION_UNSPECIFIED => 'RETRIEVABLE_OPTION_UNSPECIFIED',
+ self::RETRIEVABLE_ENABLED => 'RETRIEVABLE_ENABLED',
+ self::RETRIEVABLE_DISABLED => 'RETRIEVABLE_DISABLED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/Retail/src/V2/CatalogAttribute/SearchableOption.php b/Retail/src/V2/CatalogAttribute/SearchableOption.php
index ee674780ba1d..a7998ccf18f7 100644
--- a/Retail/src/V2/CatalogAttribute/SearchableOption.php
+++ b/Retail/src/V2/CatalogAttribute/SearchableOption.php
@@ -14,8 +14,7 @@
class SearchableOption
{
/**
- * Value used when unset. Defaults to
- * [SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.SearchableOption.SEARCHABLE_DISABLED].
+ * Value used when unset.
*
* Generated from protobuf enum SEARCHABLE_OPTION_UNSPECIFIED = 0;
*/
diff --git a/Retail/src/V2/CollectUserEventRequest.php b/Retail/src/V2/CollectUserEventRequest.php
index a64d84546e9a..abe8bfeafa26 100644
--- a/Retail/src/V2/CollectUserEventRequest.php
+++ b/Retail/src/V2/CollectUserEventRequest.php
@@ -46,6 +46,16 @@ class CollectUserEventRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field int64 ets = 4;
*/
private $ets = 0;
+ /**
+ * An arbitrary serialized JSON string that contains necessary information
+ * that can comprise a user event. When this field is specified, the
+ * user_event field will be ignored. Note: line-delimited JSON is not
+ * supported, a single JSON only.
+ *
+ * Generated from protobuf field string raw_json = 5;
+ */
+ private $raw_json = '';
+ protected $conversion_rule;
/**
* Constructor.
@@ -53,6 +63,9 @@ class CollectUserEventRequest extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
+ * @type string $prebuilt_rule
+ * The prebuilt rule name that can convert a specific type of raw_json.
+ * For example: "default_schema/v1.0"
* @type string $parent
* Required. The parent catalog name, such as
* `projects/1234/locations/global/catalogs/default_catalog`.
@@ -68,6 +81,11 @@ class CollectUserEventRequest extends \Google\Protobuf\Internal\Message
* The event timestamp in milliseconds. This prevents browser caching of
* otherwise identical get requests. The name is abbreviated to reduce the
* payload bytes.
+ * @type string $raw_json
+ * An arbitrary serialized JSON string that contains necessary information
+ * that can comprise a user event. When this field is specified, the
+ * user_event field will be ignored. Note: line-delimited JSON is not
+ * supported, a single JSON only.
* }
*/
public function __construct($data = NULL) {
@@ -75,6 +93,39 @@ public function __construct($data = NULL) {
parent::__construct($data);
}
+ /**
+ * The prebuilt rule name that can convert a specific type of raw_json.
+ * For example: "default_schema/v1.0"
+ *
+ * Generated from protobuf field string prebuilt_rule = 6;
+ * @return string
+ */
+ public function getPrebuiltRule()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasPrebuiltRule()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * The prebuilt rule name that can convert a specific type of raw_json.
+ * For example: "default_schema/v1.0"
+ *
+ * Generated from protobuf field string prebuilt_rule = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setPrebuiltRule($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
/**
* Required. The parent catalog name, such as
* `projects/1234/locations/global/catalogs/default_catalog`.
@@ -193,5 +244,45 @@ public function setEts($var)
return $this;
}
+ /**
+ * An arbitrary serialized JSON string that contains necessary information
+ * that can comprise a user event. When this field is specified, the
+ * user_event field will be ignored. Note: line-delimited JSON is not
+ * supported, a single JSON only.
+ *
+ * Generated from protobuf field string raw_json = 5;
+ * @return string
+ */
+ public function getRawJson()
+ {
+ return $this->raw_json;
+ }
+
+ /**
+ * An arbitrary serialized JSON string that contains necessary information
+ * that can comprise a user event. When this field is specified, the
+ * user_event field will be ignored. Note: line-delimited JSON is not
+ * supported, a single JSON only.
+ *
+ * Generated from protobuf field string raw_json = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setRawJson($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->raw_json = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getConversionRule()
+ {
+ return $this->whichOneof("conversion_rule");
+ }
+
}
diff --git a/Retail/src/V2/CompleteQueryRequest.php b/Retail/src/V2/CompleteQueryRequest.php
index a01eb983244c..372d047f6034 100644
--- a/Retail/src/V2/CompleteQueryRequest.php
+++ b/Retail/src/V2/CompleteQueryRequest.php
@@ -55,8 +55,9 @@ class CompleteQueryRequest extends \Google\Protobuf\Internal\Message
*/
private $language_codes;
/**
- * The device type context for completion suggestions.
- * It is useful to apply different suggestions on different device types, e.g.
+ * The device type context for completion suggestions. We recommend that you
+ * leave this field empty.
+ * It can apply different suggestions on different device types, e.g.
* `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device
* types.
* Supported formats:
@@ -124,8 +125,9 @@ class CompleteQueryRequest extends \Google\Protobuf\Internal\Message
* Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum
* number of language codes is 3.
* @type string $device_type
- * The device type context for completion suggestions.
- * It is useful to apply different suggestions on different device types, e.g.
+ * The device type context for completion suggestions. We recommend that you
+ * leave this field empty.
+ * It can apply different suggestions on different device types, e.g.
* `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device
* types.
* Supported formats:
@@ -292,8 +294,9 @@ public function setLanguageCodes($var)
}
/**
- * The device type context for completion suggestions.
- * It is useful to apply different suggestions on different device types, e.g.
+ * The device type context for completion suggestions. We recommend that you
+ * leave this field empty.
+ * It can apply different suggestions on different device types, e.g.
* `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device
* types.
* Supported formats:
@@ -311,8 +314,9 @@ public function getDeviceType()
}
/**
- * The device type context for completion suggestions.
- * It is useful to apply different suggestions on different device types, e.g.
+ * The device type context for completion suggestions. We recommend that you
+ * leave this field empty.
+ * It can apply different suggestions on different device types, e.g.
* `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device
* types.
* Supported formats:
diff --git a/Retail/src/V2/Condition/QueryTerm.php b/Retail/src/V2/Condition/QueryTerm.php
index 1663d7d2b934..03b0e64e369b 100644
--- a/Retail/src/V2/Condition/QueryTerm.php
+++ b/Retail/src/V2/Condition/QueryTerm.php
@@ -20,8 +20,8 @@ class QueryTerm extends \Google\Protobuf\Internal\Message
* Value cannot be empty.
* Value can have at most 3 terms if specified as a partial match. Each
* space separated string is considered as one term.
- * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not
- * allowed for partial match.
+ * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
+ * and not allowed for a partial match.
*
* Generated from protobuf field string value = 1;
*/
@@ -44,8 +44,8 @@ class QueryTerm extends \Google\Protobuf\Internal\Message
* Value cannot be empty.
* Value can have at most 3 terms if specified as a partial match. Each
* space separated string is considered as one term.
- * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not
- * allowed for partial match.
+ * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
+ * and not allowed for a partial match.
* @type bool $full_match
* Whether this is supposed to be a full or partial match.
* }
@@ -60,8 +60,8 @@ public function __construct($data = NULL) {
* Value cannot be empty.
* Value can have at most 3 terms if specified as a partial match. Each
* space separated string is considered as one term.
- * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not
- * allowed for partial match.
+ * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
+ * and not allowed for a partial match.
*
* Generated from protobuf field string value = 1;
* @return string
@@ -76,8 +76,8 @@ public function getValue()
* Value cannot be empty.
* Value can have at most 3 terms if specified as a partial match. Each
* space separated string is considered as one term.
- * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not
- * allowed for partial match.
+ * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
+ * and not allowed for a partial match.
*
* Generated from protobuf field string value = 1;
* @param string $var
diff --git a/Retail/src/V2/Control.php b/Retail/src/V2/Control.php
index 32aba37dda43..78a46a63dadc 100644
--- a/Retail/src/V2/Control.php
+++ b/Retail/src/V2/Control.php
@@ -33,9 +33,8 @@ class Control extends \Google\Protobuf\Internal\Message
*/
private $display_name = '';
/**
- * Output only. List of [serving
- * configuration][google.cloud.retail.v2.ServingConfig] ids that are
- * associated with this control in the same
+ * Output only. List of [serving config][google.cloud.retail.v2.ServingConfig]
+ * ids that are associated with this control in the same
* [Catalog][google.cloud.retail.v2.Catalog].
* Note the association is managed via the
* [ServingConfig][google.cloud.retail.v2.ServingConfig], this is an output
@@ -86,9 +85,8 @@ class Control extends \Google\Protobuf\Internal\Message
* This field must be a UTF-8 encoded string with a length limit of 128
* characters. Otherwise, an INVALID_ARGUMENT error is thrown.
* @type array|\Google\Protobuf\Internal\RepeatedField $associated_serving_config_ids
- * Output only. List of [serving
- * configuration][google.cloud.retail.v2.ServingConfig] ids that are
- * associated with this control in the same
+ * Output only. List of [serving config][google.cloud.retail.v2.ServingConfig]
+ * ids that are associated with this control in the same
* [Catalog][google.cloud.retail.v2.Catalog].
* Note the association is managed via the
* [ServingConfig][google.cloud.retail.v2.ServingConfig], this is an output
@@ -208,9 +206,8 @@ public function setDisplayName($var)
}
/**
- * Output only. List of [serving
- * configuration][google.cloud.retail.v2.ServingConfig] ids that are
- * associated with this control in the same
+ * Output only. List of [serving config][google.cloud.retail.v2.ServingConfig]
+ * ids that are associated with this control in the same
* [Catalog][google.cloud.retail.v2.Catalog].
* Note the association is managed via the
* [ServingConfig][google.cloud.retail.v2.ServingConfig], this is an output
@@ -225,9 +222,8 @@ public function getAssociatedServingConfigIds()
}
/**
- * Output only. List of [serving
- * configuration][google.cloud.retail.v2.ServingConfig] ids that are
- * associated with this control in the same
+ * Output only. List of [serving config][google.cloud.retail.v2.ServingConfig]
+ * ids that are associated with this control in the same
* [Catalog][google.cloud.retail.v2.Catalog].
* Note the association is managed via the
* [ServingConfig][google.cloud.retail.v2.ServingConfig], this is an output
diff --git a/Retail/src/V2/DeleteServingConfigRequest.php b/Retail/src/V2/DeleteServingConfigRequest.php
index 72900b34a95e..5b826c2a0118 100644
--- a/Retail/src/V2/DeleteServingConfigRequest.php
+++ b/Retail/src/V2/DeleteServingConfigRequest.php
@@ -17,7 +17,7 @@ class DeleteServingConfigRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The resource name of the ServingConfig to delete. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -31,7 +31,7 @@ class DeleteServingConfigRequest extends \Google\Protobuf\Internal\Message
*
* @type string $name
* Required. The resource name of the ServingConfig to delete. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* }
*/
public function __construct($data = NULL) {
@@ -41,7 +41,7 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the ServingConfig to delete. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -53,7 +53,7 @@ public function getName()
/**
* Required. The resource name of the ServingConfig to delete. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/Retail/src/V2/Gapic/CatalogServiceGapicClient.php b/Retail/src/V2/Gapic/CatalogServiceGapicClient.php
index 8247bdc0dd16..4e41c41076af 100644
--- a/Retail/src/V2/Gapic/CatalogServiceGapicClient.php
+++ b/Retail/src/V2/Gapic/CatalogServiceGapicClient.php
@@ -532,7 +532,7 @@ public function getAttributesConfig($name, array $optionalArgs = [])
* ```
*
* @param string $name Required. Full CompletionConfig resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
* @param array $optionalArgs {
* Optional.
*
diff --git a/Retail/src/V2/Gapic/CompletionServiceGapicClient.php b/Retail/src/V2/Gapic/CompletionServiceGapicClient.php
index 38fc4ba217d8..29e984a4959a 100644
--- a/Retail/src/V2/Gapic/CompletionServiceGapicClient.php
+++ b/Retail/src/V2/Gapic/CompletionServiceGapicClient.php
@@ -45,7 +45,7 @@
* Service Description: Auto-completion service for retail.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
@@ -305,7 +305,7 @@ public function __construct(array $options = [])
* Completes the specified prefix with keyword suggestions.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
@@ -348,8 +348,10 @@ public function __construct(array $options = [])
* Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum
* number of language codes is 3.
* @type string $deviceType
- * The device type context for completion suggestions.
- * It is useful to apply different suggestions on different device types, e.g.
+ * The device type context for completion suggestions. We recommend that you
+ * leave this field empty.
+ *
+ * It can apply different suggestions on different device types, e.g.
* `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device
* types.
*
@@ -443,7 +445,7 @@ public function completeQuery($catalog, $query, array $optionalArgs = [])
* are indexed successfully and ready for serving. The process takes hours.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
diff --git a/Retail/src/V2/Gapic/PredictionServiceGapicClient.php b/Retail/src/V2/Gapic/PredictionServiceGapicClient.php
index 1df40d67099d..6924d9c1563b 100644
--- a/Retail/src/V2/Gapic/PredictionServiceGapicClient.php
+++ b/Retail/src/V2/Gapic/PredictionServiceGapicClient.php
@@ -184,7 +184,7 @@ public function __construct(array $options = [])
* The ID of the Recommendations AI serving config or placement.
* Before you can request predictions from your model, you must create at
* least one serving config or placement for it. For more information, see
- * [Managing serving configurations]
+ * [Manage serving configs]
* (https://cloud.google.com/retail/docs/manage-configs).
*
* The full list of available serving configs can be seen at
@@ -237,12 +237,11 @@ public function __construct(array $options = [])
* * filterOutOfStockItems tag=(-"promotional")
* * filterOutOfStockItems
*
- * If your filter blocks all prediction results, the API will return generic
- * (unfiltered) popular products. If you only want results strictly matching
- * the filters, set `strictFiltering` to True in `PredictRequest.params` to
- * receive empty results instead.
- * Note that the API will never return items with storageStatus of "EXPIRED"
- * or "DELETED" regardless of filter choices.
+ * If your filter blocks all prediction results, the API will return *no*
+ * results. If instead you want empty result sets to return generic
+ * (unfiltered) popular products, set `strictFiltering` to False in
+ * `PredictRequest.params`. Note that the API will never return items with
+ * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
*
* If `filterSyntaxV2` is set to true under the `params` field, then
* attribute-based expressions are expected instead of the above described
@@ -267,7 +266,7 @@ public function __construct(array $options = [])
* * `returnScore`: Boolean. If set to true, the prediction 'score'
* corresponding to each returned product will be set in the
* `results.metadata` field in the prediction response. The given
- * 'score' indicates the probability of an product being clicked/purchased
+ * 'score' indicates the probability of a product being clicked/purchased
* given the user's context and history.
* * `strictFiltering`: Boolean. True by default. If set to false, the service
* will return generic (unfiltered) popular products instead of empty if
diff --git a/Retail/src/V2/Gapic/ProductServiceGapicClient.php b/Retail/src/V2/Gapic/ProductServiceGapicClient.php
index 6f8b19fc1252..34da51a12fb3 100644
--- a/Retail/src/V2/Gapic/ProductServiceGapicClient.php
+++ b/Retail/src/V2/Gapic/ProductServiceGapicClient.php
@@ -399,15 +399,17 @@ public function __construct(array $options = [])
* or
* [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
@@ -568,15 +570,17 @@ public function addFulfillmentPlaces(
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
* has no effect on local inventories.
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
@@ -1186,15 +1190,17 @@ public function listProducts($parent, array $optionalArgs = [])
* or
* [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
@@ -1348,15 +1354,17 @@ public function removeFulfillmentPlaces(
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
* has no effect on local inventories.
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s will be obsolete
+ * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+ * API will return NOT_FOUND afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates will not be marked as [done][google.longrunning.Operation.done]
+ * until being obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
@@ -1467,9 +1475,9 @@ public function removeLocalInventories(
*
* This process is asynchronous and does not require the
* [Product][google.cloud.retail.v2.Product] to exist before updating
- * fulfillment information. If the request is valid, the update will be
- * enqueued and processed downstream. As a consequence, when a response is
- * returned, updates are not immediately manifested in the
+ * fulfillment information. If the request is valid, the update is enqueued
+ * and processed downstream. As a consequence, when a response is returned,
+ * updates are not immediately manifested in the
* [Product][google.cloud.retail.v2.Product] queried by
* [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
* or
@@ -1479,10 +1487,10 @@ public function removeLocalInventories(
* [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
* and
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct],
- * the specified inventory field value(s) will overwrite any existing value(s)
+ * the specified inventory field value(s) overwrite any existing value(s)
* while ignoring the last update time for this field. Furthermore, the last
- * update time for the specified inventory fields will be overwritten to the
- * time of the
+ * update times for the specified inventory fields are overwritten by the
+ * times of the
* [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
* or
* [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
@@ -1490,11 +1498,11 @@ public function removeLocalInventories(
*
* If no inventory fields are set in
* [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product],
- * then any pre-existing inventory information for this product will be used.
+ * then any pre-existing inventory information for this product is used.
*
* If no inventory fields are set in
* [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask],
- * then any existing inventory information will be preserved.
+ * then any existing inventory information is preserved.
*
* Pre-existing inventory information can only be updated with
* [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory],
@@ -1502,15 +1510,17 @@ public function removeLocalInventories(
* and
* [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
*
- * The returned [Operation][]s will be obsolete after 1 day, and
- * [GetOperation][] API will return NOT_FOUND afterwards.
+ * The returned [Operation][google.longrunning.Operation]s is obsolete after
+ * one day, and the [GetOperation][google.longrunning.Operations.GetOperation]
+ * API returns `NOT_FOUND` afterwards.
*
- * If conflicting updates are issued, the [Operation][]s associated with the
- * stale updates will not be marked as [done][Operation.done] until being
- * obsolete.
+ * If conflicting updates are issued, the
+ * [Operation][google.longrunning.Operation]s associated with the stale
+ * updates are not marked as [done][google.longrunning.Operation.done] until
+ * they are obsolete.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
diff --git a/Retail/src/V2/Gapic/SearchServiceGapicClient.php b/Retail/src/V2/Gapic/SearchServiceGapicClient.php
index 64fda2cd0e21..a52b1756ce0e 100644
--- a/Retail/src/V2/Gapic/SearchServiceGapicClient.php
+++ b/Retail/src/V2/Gapic/SearchServiceGapicClient.php
@@ -47,7 +47,7 @@
* Service Description: Service for search.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
@@ -282,7 +282,7 @@ public function __construct(array $options = [])
* Performs a search.
*
* This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
*
* Sample code:
* ```
@@ -312,7 +312,7 @@ public function __construct(array $options = [])
* `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
* or the name of the legacy placement resource, such as
* `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
- * This field is used to identify the serving configuration name and the set
+ * This field is used to identify the serving config name and the set
* of models that will be used to make the search.
* @param string $visitorId Required. A unique identifier for tracking visitors. For example, this
* could be implemented with an HTTP cookie, which should be able to uniquely
@@ -491,7 +491,7 @@ public function __construct(array $options = [])
* [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
*
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
*
* Category pages include special pages such as sales or promotions. For
diff --git a/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php b/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php
index 90395fa335d8..1333af533c2f 100644
--- a/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php
+++ b/Retail/src/V2/Gapic/ServingConfigServiceGapicClient.php
@@ -328,7 +328,7 @@ public function __construct(array $options = [])
* ```
*
* @param string $servingConfig Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* @param string $controlId Required. The id of the control to apply. Assumed to be in the same catalog
* as the serving config - if id is not found a NOT_FOUND error is returned.
* @param array $optionalArgs {
@@ -452,7 +452,7 @@ public function createServingConfig(
* ```
*
* @param string $name Required. The resource name of the ServingConfig to delete. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* @param array $optionalArgs {
* Optional.
*
@@ -501,7 +501,7 @@ public function deleteServingConfig($name, array $optionalArgs = [])
* ```
*
* @param string $name Required. The resource name of the ServingConfig to get. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* @param array $optionalArgs {
* Optional.
*
@@ -562,7 +562,7 @@ public function getServingConfig($name, array $optionalArgs = [])
* ```
*
* @param string $parent Required. The catalog resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
* @param array $optionalArgs {
* Optional.
*
@@ -632,7 +632,7 @@ public function listServingConfigs($parent, array $optionalArgs = [])
* ```
*
* @param string $servingConfig Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* @param string $controlId Required. The id of the control to apply. Assumed to be in the same catalog
* as the serving config.
* @param array $optionalArgs {
diff --git a/Retail/src/V2/Gapic/UserEventServiceGapicClient.php b/Retail/src/V2/Gapic/UserEventServiceGapicClient.php
index 1d6d9bea6a3d..b8a10c81f848 100644
--- a/Retail/src/V2/Gapic/UserEventServiceGapicClient.php
+++ b/Retail/src/V2/Gapic/UserEventServiceGapicClient.php
@@ -330,6 +330,9 @@ public function __construct(array $options = [])
* @param array $optionalArgs {
* Optional.
*
+ * @type string $prebuiltRule
+ * The prebuilt rule name that can convert a specific type of raw_json.
+ * For example: "default_schema/v1.0"
* @type string $uri
* The URL including cgi-parameters but excluding the hash fragment with a
* length limit of 5,000 characters. This is often more useful than the
@@ -339,6 +342,11 @@ public function __construct(array $options = [])
* The event timestamp in milliseconds. This prevents browser caching of
* otherwise identical get requests. The name is abbreviated to reduce the
* payload bytes.
+ * @type string $rawJson
+ * An arbitrary serialized JSON string that contains necessary information
+ * that can comprise a user event. When this field is specified, the
+ * user_event field will be ignored. Note: line-delimited JSON is not
+ * supported, a single JSON only.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
@@ -359,6 +367,10 @@ public function collectUserEvent(
$request->setParent($parent);
$request->setUserEvent($userEvent);
$requestParamHeaders['parent'] = $parent;
+ if (isset($optionalArgs['prebuiltRule'])) {
+ $request->setPrebuiltRule($optionalArgs['prebuiltRule']);
+ }
+
if (isset($optionalArgs['uri'])) {
$request->setUri($optionalArgs['uri']);
}
@@ -367,6 +379,10 @@ public function collectUserEvent(
$request->setEts($optionalArgs['ets']);
}
+ if (isset($optionalArgs['rawJson'])) {
+ $request->setRawJson($optionalArgs['rawJson']);
+ }
+
$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
@@ -585,14 +601,14 @@ public function purgeUserEvents($parent, $filter, array $optionalArgs = [])
}
/**
- * Starts a user event rejoin operation with latest product catalog. Events
- * will not be annotated with detailed product information if product is
- * missing from the catalog at the time the user event is ingested, and these
- * events are stored as unjoined events with a limited usage on training and
- * serving. This method can be used to start a join operation on specified
- * events with latest version of product catalog. It can also be used to
- * correct events joined with the wrong product catalog. A rejoin operation
- * can take hours or days to complete.
+ * Starts a user-event rejoin operation with latest product catalog. Events
+ * are not annotated with detailed product information for products that are
+ * missing from the catalog when the user event is ingested. These
+ * events are stored as unjoined events with limited usage on training and
+ * serving. You can use this method to start a join operation on specified
+ * events with the latest version of product catalog. You can also use this
+ * method to correct events joined with the wrong product catalog. A rejoin
+ * operation can take hours or days to complete.
*
* Sample code:
* ```
@@ -638,8 +654,8 @@ public function purgeUserEvents($parent, $filter, array $optionalArgs = [])
* @type int $userEventRejoinScope
* The type of the user event rejoin to define the scope and range of the user
* events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
+ * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+ * an invalid integer value.
* For allowed values, use constants defined on {@see \Google\Cloud\Retail\V2\RejoinUserEventsRequest\UserEventRejoinScope}
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
@@ -698,6 +714,11 @@ public function rejoinUserEvents($parent, array $optionalArgs = [])
* @param array $optionalArgs {
* Optional.
*
+ * @type bool $writeAsync
+ * If set to true, the user event will be written asynchronously after
+ * validation, and the API will respond without waiting for the write.
+ * Therefore, silent failures can occur even if the API returns success. In
+ * case of silent failures, error messages can be found in Stackdriver logs.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
@@ -718,6 +739,10 @@ public function writeUserEvent(
$request->setParent($parent);
$request->setUserEvent($userEvent);
$requestParamHeaders['parent'] = $parent;
+ if (isset($optionalArgs['writeAsync'])) {
+ $request->setWriteAsync($optionalArgs['writeAsync']);
+ }
+
$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
diff --git a/Retail/src/V2/GetCompletionConfigRequest.php b/Retail/src/V2/GetCompletionConfigRequest.php
index 01db62c7ed22..6563b608d398 100644
--- a/Retail/src/V2/GetCompletionConfigRequest.php
+++ b/Retail/src/V2/GetCompletionConfigRequest.php
@@ -19,7 +19,7 @@ class GetCompletionConfigRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. Full CompletionConfig resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -33,7 +33,7 @@ class GetCompletionConfigRequest extends \Google\Protobuf\Internal\Message
*
* @type string $name
* Required. Full CompletionConfig resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
* }
*/
public function __construct($data = NULL) {
@@ -43,7 +43,7 @@ public function __construct($data = NULL) {
/**
* Required. Full CompletionConfig resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -55,7 +55,7 @@ public function getName()
/**
* Required. Full CompletionConfig resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/Retail/src/V2/GetServingConfigRequest.php b/Retail/src/V2/GetServingConfigRequest.php
index dd115cc00ef7..955eb6b2a4b3 100644
--- a/Retail/src/V2/GetServingConfigRequest.php
+++ b/Retail/src/V2/GetServingConfigRequest.php
@@ -17,7 +17,7 @@ class GetServingConfigRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The resource name of the ServingConfig to get. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -31,7 +31,7 @@ class GetServingConfigRequest extends \Google\Protobuf\Internal\Message
*
* @type string $name
* Required. The resource name of the ServingConfig to get. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* }
*/
public function __construct($data = NULL) {
@@ -41,7 +41,7 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the ServingConfig to get. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -53,7 +53,7 @@ public function getName()
/**
* Required. The resource name of the ServingConfig to get. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/Retail/src/V2/ListServingConfigsRequest.php b/Retail/src/V2/ListServingConfigsRequest.php
index 8e9c1652afde..c1f58424c18e 100644
--- a/Retail/src/V2/ListServingConfigsRequest.php
+++ b/Retail/src/V2/ListServingConfigsRequest.php
@@ -17,7 +17,7 @@ class ListServingConfigsRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The catalog resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -46,7 +46,7 @@ class ListServingConfigsRequest extends \Google\Protobuf\Internal\Message
*
* @type string $parent
* Required. The catalog resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
* @type int $page_size
* Optional. Maximum number of results to return. If unspecified, defaults
* to 100. If a value greater than 100 is provided, at most 100 results are
@@ -63,7 +63,7 @@ public function __construct($data = NULL) {
/**
* Required. The catalog resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -75,7 +75,7 @@ public function getParent()
/**
* Required. The catalog resource name. Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/Retail/src/V2/PredictRequest.php b/Retail/src/V2/PredictRequest.php
index f162d86b74c4..52327719e178 100644
--- a/Retail/src/V2/PredictRequest.php
+++ b/Retail/src/V2/PredictRequest.php
@@ -25,7 +25,7 @@ class PredictRequest extends \Google\Protobuf\Internal\Message
* The ID of the Recommendations AI serving config or placement.
* Before you can request predictions from your model, you must create at
* least one serving config or placement for it. For more information, see
- * [Managing serving configurations]
+ * [Manage serving configs]
* (https://cloud.google.com/retail/docs/manage-configs).
* The full list of available serving configs can be seen at
* https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
@@ -85,12 +85,11 @@ class PredictRequest extends \Google\Protobuf\Internal\Message
* * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional")
* * filterOutOfStockItems tag=(-"promotional")
* * filterOutOfStockItems
- * If your filter blocks all prediction results, the API will return generic
- * (unfiltered) popular products. If you only want results strictly matching
- * the filters, set `strictFiltering` to True in `PredictRequest.params` to
- * receive empty results instead.
- * Note that the API will never return items with storageStatus of "EXPIRED"
- * or "DELETED" regardless of filter choices.
+ * If your filter blocks all prediction results, the API will return *no*
+ * results. If instead you want empty result sets to return generic
+ * (unfiltered) popular products, set `strictFiltering` to False in
+ * `PredictRequest.params`. Note that the API will never return items with
+ * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
* If `filterSyntaxV2` is set to true under the `params` field, then
* attribute-based expressions are expected instead of the above described
* tag-based syntax. Examples:
@@ -119,7 +118,7 @@ class PredictRequest extends \Google\Protobuf\Internal\Message
* * `returnScore`: Boolean. If set to true, the prediction 'score'
* corresponding to each returned product will be set in the
* `results.metadata` field in the prediction response. The given
- * 'score' indicates the probability of an product being clicked/purchased
+ * 'score' indicates the probability of a product being clicked/purchased
* given the user's context and history.
* * `strictFiltering`: Boolean. True by default. If set to false, the service
* will return generic (unfiltered) popular products instead of empty if
@@ -177,7 +176,7 @@ class PredictRequest extends \Google\Protobuf\Internal\Message
* The ID of the Recommendations AI serving config or placement.
* Before you can request predictions from your model, you must create at
* least one serving config or placement for it. For more information, see
- * [Managing serving configurations]
+ * [Manage serving configs]
* (https://cloud.google.com/retail/docs/manage-configs).
* The full list of available serving configs can be seen at
* https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
@@ -220,12 +219,11 @@ class PredictRequest extends \Google\Protobuf\Internal\Message
* * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional")
* * filterOutOfStockItems tag=(-"promotional")
* * filterOutOfStockItems
- * If your filter blocks all prediction results, the API will return generic
- * (unfiltered) popular products. If you only want results strictly matching
- * the filters, set `strictFiltering` to True in `PredictRequest.params` to
- * receive empty results instead.
- * Note that the API will never return items with storageStatus of "EXPIRED"
- * or "DELETED" regardless of filter choices.
+ * If your filter blocks all prediction results, the API will return *no*
+ * results. If instead you want empty result sets to return generic
+ * (unfiltered) popular products, set `strictFiltering` to False in
+ * `PredictRequest.params`. Note that the API will never return items with
+ * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
* If `filterSyntaxV2` is set to true under the `params` field, then
* attribute-based expressions are expected instead of the above described
* tag-based syntax. Examples:
@@ -246,7 +244,7 @@ class PredictRequest extends \Google\Protobuf\Internal\Message
* * `returnScore`: Boolean. If set to true, the prediction 'score'
* corresponding to each returned product will be set in the
* `results.metadata` field in the prediction response. The given
- * 'score' indicates the probability of an product being clicked/purchased
+ * 'score' indicates the probability of a product being clicked/purchased
* given the user's context and history.
* * `strictFiltering`: Boolean. True by default. If set to false, the service
* will return generic (unfiltered) popular products instead of empty if
@@ -296,7 +294,7 @@ public function __construct($data = NULL) {
* The ID of the Recommendations AI serving config or placement.
* Before you can request predictions from your model, you must create at
* least one serving config or placement for it. For more information, see
- * [Managing serving configurations]
+ * [Manage serving configs]
* (https://cloud.google.com/retail/docs/manage-configs).
* The full list of available serving configs can be seen at
* https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
@@ -319,7 +317,7 @@ public function getPlacement()
* The ID of the Recommendations AI serving config or placement.
* Before you can request predictions from your model, you must create at
* least one serving config or placement for it. For more information, see
- * [Managing serving configurations]
+ * [Manage serving configs]
* (https://cloud.google.com/retail/docs/manage-configs).
* The full list of available serving configs can be seen at
* https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
@@ -476,12 +474,11 @@ public function setPageToken($var)
* * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional")
* * filterOutOfStockItems tag=(-"promotional")
* * filterOutOfStockItems
- * If your filter blocks all prediction results, the API will return generic
- * (unfiltered) popular products. If you only want results strictly matching
- * the filters, set `strictFiltering` to True in `PredictRequest.params` to
- * receive empty results instead.
- * Note that the API will never return items with storageStatus of "EXPIRED"
- * or "DELETED" regardless of filter choices.
+ * If your filter blocks all prediction results, the API will return *no*
+ * results. If instead you want empty result sets to return generic
+ * (unfiltered) popular products, set `strictFiltering` to False in
+ * `PredictRequest.params`. Note that the API will never return items with
+ * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
* If `filterSyntaxV2` is set to true under the `params` field, then
* attribute-based expressions are expected instead of the above described
* tag-based syntax. Examples:
@@ -515,12 +512,11 @@ public function getFilter()
* * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional")
* * filterOutOfStockItems tag=(-"promotional")
* * filterOutOfStockItems
- * If your filter blocks all prediction results, the API will return generic
- * (unfiltered) popular products. If you only want results strictly matching
- * the filters, set `strictFiltering` to True in `PredictRequest.params` to
- * receive empty results instead.
- * Note that the API will never return items with storageStatus of "EXPIRED"
- * or "DELETED" regardless of filter choices.
+ * If your filter blocks all prediction results, the API will return *no*
+ * results. If instead you want empty result sets to return generic
+ * (unfiltered) popular products, set `strictFiltering` to False in
+ * `PredictRequest.params`. Note that the API will never return items with
+ * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
* If `filterSyntaxV2` is set to true under the `params` field, then
* attribute-based expressions are expected instead of the above described
* tag-based syntax. Examples:
@@ -581,7 +577,7 @@ public function setValidateOnly($var)
* * `returnScore`: Boolean. If set to true, the prediction 'score'
* corresponding to each returned product will be set in the
* `results.metadata` field in the prediction response. The given
- * 'score' indicates the probability of an product being clicked/purchased
+ * 'score' indicates the probability of a product being clicked/purchased
* given the user's context and history.
* * `strictFiltering`: Boolean. True by default. If set to false, the service
* will return generic (unfiltered) popular products instead of empty if
@@ -616,7 +612,7 @@ public function getParams()
* * `returnScore`: Boolean. If set to true, the prediction 'score'
* corresponding to each returned product will be set in the
* `results.metadata` field in the prediction response. The given
- * 'score' indicates the probability of an product being clicked/purchased
+ * 'score' indicates the probability of a product being clicked/purchased
* given the user's context and history.
* * `strictFiltering`: Boolean. True by default. If set to false, the service
* will return generic (unfiltered) popular products instead of empty if
diff --git a/Retail/src/V2/Product.php b/Retail/src/V2/Product.php
index c6f70322c118..2b1bc7c582b9 100644
--- a/Retail/src/V2/Product.php
+++ b/Retail/src/V2/Product.php
@@ -105,7 +105,7 @@ class Product extends \Google\Protobuf\Internal\Message
* belonging to several parallel categories. Strongly recommended using the
* full path for better search / recommendation quality.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* For example, if a shoes product belongs to both
* ["Shoes & Accessories" -> "Shoes"] and
@@ -239,7 +239,11 @@ class Product extends \Google\Protobuf\Internal\Message
/**
* The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
* available for
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
+ * that this is only applicable to
+ * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
+ * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
+ * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
*
* Generated from protobuf field .google.protobuf.Timestamp available_time = 18;
*/
@@ -437,10 +441,12 @@ class Product extends \Google\Protobuf\Internal\Message
* Note: Returning more fields in
* [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
* response payload size and serving latency.
+ * This field is deprecated. Use the retrievable site-wide control instead.
*
- * Generated from protobuf field .google.protobuf.FieldMask retrievable_fields = 30;
+ * Generated from protobuf field .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
+ * @deprecated
*/
- private $retrievable_fields = null;
+ protected $retrievable_fields = null;
/**
* Output only. Product variants grouped together on primary product which
* share similar product attributes. It's automatically grouped by
@@ -458,7 +464,11 @@ class Product extends \Google\Protobuf\Internal\Message
/**
* 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 [AddLocalInventories][] and [RemoveLocalInventories][] APIs.
+ * be managed by
+ * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
+ * and
+ * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
+ * APIs.
*
* Generated from protobuf field repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@@ -473,7 +483,13 @@ class Product extends \Google\Protobuf\Internal\Message
*
* @type \Google\Protobuf\Timestamp $expire_time
* The timestamp when this product becomes unavailable for
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
+ * that this is only applicable to
+ * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
+ * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
+ * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
+ * In general, we suggest the users to delete the stale products explicitly,
+ * instead of using this field to determine staleness.
* If it is set, the [Product][google.cloud.retail.v2.Product] is not
* available for
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
@@ -489,7 +505,13 @@ class Product extends \Google\Protobuf\Internal\Message
* Corresponding properties: Google Merchant Center property
* [expiration_date](https://support.google.com/merchants/answer/6324499).
* @type \Google\Protobuf\Duration $ttl
- * Input only. The TTL (time to live) of the product.
+ * Input only. The TTL (time to live) of the product. Note that this is only
+ * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
+ * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
+ * and ignored for
+ * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
+ * we suggest the users to delete the stale products explicitly, instead of
+ * using this field to determine staleness.
* If it is set, it must be a non-negative value, and
* [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
* current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
@@ -568,7 +590,7 @@ class Product extends \Google\Protobuf\Internal\Message
* belonging to several parallel categories. Strongly recommended using the
* full path for better search / recommendation quality.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* For example, if a shoes product belongs to both
* ["Shoes & Accessories" -> "Shoes"] and
@@ -666,7 +688,11 @@ class Product extends \Google\Protobuf\Internal\Message
* @type \Google\Protobuf\Timestamp $available_time
* The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
* available for
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
+ * that this is only applicable to
+ * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
+ * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
+ * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
* @type int $availability
* The online availability of the [Product][google.cloud.retail.v2.Product].
* Default to
@@ -808,6 +834,7 @@ class Product extends \Google\Protobuf\Internal\Message
* Note: Returning more fields in
* [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
* response payload size and serving latency.
+ * This field is deprecated. Use the retrievable site-wide control instead.
* @type array<\Google\Cloud\Retail\V2\Product>|\Google\Protobuf\Internal\RepeatedField $variants
* Output only. Product variants grouped together on primary product which
* share similar product attributes. It's automatically grouped by
@@ -821,7 +848,11 @@ class Product extends \Google\Protobuf\Internal\Message
* @type array<\Google\Cloud\Retail\V2\LocalInventory>|\Google\Protobuf\Internal\RepeatedField $local_inventories
* 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 [AddLocalInventories][] and [RemoveLocalInventories][] APIs.
+ * be managed by
+ * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
+ * and
+ * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
+ * APIs.
* }
*/
public function __construct($data = NULL) {
@@ -831,7 +862,13 @@ public function __construct($data = NULL) {
/**
* The timestamp when this product becomes unavailable for
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
+ * that this is only applicable to
+ * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
+ * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
+ * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
+ * In general, we suggest the users to delete the stale products explicitly,
+ * instead of using this field to determine staleness.
* If it is set, the [Product][google.cloud.retail.v2.Product] is not
* available for
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
@@ -862,7 +899,13 @@ public function hasExpireTime()
/**
* The timestamp when this product becomes unavailable for
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
+ * that this is only applicable to
+ * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
+ * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
+ * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
+ * In general, we suggest the users to delete the stale products explicitly,
+ * instead of using this field to determine staleness.
* If it is set, the [Product][google.cloud.retail.v2.Product] is not
* available for
* [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
@@ -891,7 +934,13 @@ public function setExpireTime($var)
}
/**
- * Input only. The TTL (time to live) of the product.
+ * Input only. The TTL (time to live) of the product. Note that this is only
+ * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
+ * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
+ * and ignored for
+ * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
+ * we suggest the users to delete the stale products explicitly, instead of
+ * using this field to determine staleness.
* If it is set, it must be a non-negative value, and
* [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
* current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
@@ -920,7 +969,13 @@ public function hasTtl()
}
/**
- * Input only. The TTL (time to live) of the product.
+ * Input only. The TTL (time to live) of the product. Note that this is only
+ * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
+ * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
+ * and ignored for
+ * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
+ * we suggest the users to delete the stale products explicitly, instead of
+ * using this field to determine staleness.
* If it is set, it must be a non-negative value, and
* [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
* current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
@@ -1204,7 +1259,7 @@ public function setGtin($var)
* belonging to several parallel categories. Strongly recommended using the
* full path for better search / recommendation quality.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* For example, if a shoes product belongs to both
* ["Shoes & Accessories" -> "Shoes"] and
@@ -1240,7 +1295,7 @@ public function getCategories()
* belonging to several parallel categories. Strongly recommended using the
* full path for better search / recommendation quality.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* For example, if a shoes product belongs to both
* ["Shoes & Accessories" -> "Shoes"] and
@@ -1620,7 +1675,11 @@ public function setRating($var)
/**
* The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
* available for
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
+ * that this is only applicable to
+ * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
+ * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
+ * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
*
* Generated from protobuf field .google.protobuf.Timestamp available_time = 18;
* @return \Google\Protobuf\Timestamp|null
@@ -1643,7 +1702,11 @@ public function clearAvailableTime()
/**
* The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
* available for
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
+ * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
+ * that this is only applicable to
+ * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
+ * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
+ * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
*
* Generated from protobuf field .google.protobuf.Timestamp available_time = 18;
* @param \Google\Protobuf\Timestamp $var
@@ -2247,22 +2310,27 @@ public function setPublishTime($var)
* Note: Returning more fields in
* [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
* response payload size and serving latency.
+ * This field is deprecated. Use the retrievable site-wide control instead.
*
- * Generated from protobuf field .google.protobuf.FieldMask retrievable_fields = 30;
+ * Generated from protobuf field .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
* @return \Google\Protobuf\FieldMask|null
+ * @deprecated
*/
public function getRetrievableFields()
{
+ @trigger_error('retrievable_fields is deprecated.', E_USER_DEPRECATED);
return $this->retrievable_fields;
}
public function hasRetrievableFields()
{
+ @trigger_error('retrievable_fields is deprecated.', E_USER_DEPRECATED);
return isset($this->retrievable_fields);
}
public function clearRetrievableFields()
{
+ @trigger_error('retrievable_fields is deprecated.', E_USER_DEPRECATED);
unset($this->retrievable_fields);
}
@@ -2311,13 +2379,16 @@ public function clearRetrievableFields()
* Note: Returning more fields in
* [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
* response payload size and serving latency.
+ * This field is deprecated. Use the retrievable site-wide control instead.
*
- * Generated from protobuf field .google.protobuf.FieldMask retrievable_fields = 30;
+ * Generated from protobuf field .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
* @param \Google\Protobuf\FieldMask $var
* @return $this
+ * @deprecated
*/
public function setRetrievableFields($var)
{
+ @trigger_error('retrievable_fields is deprecated.', E_USER_DEPRECATED);
GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
$this->retrievable_fields = $var;
@@ -2369,7 +2440,11 @@ public function setVariants($var)
/**
* 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 [AddLocalInventories][] and [RemoveLocalInventories][] APIs.
+ * be managed by
+ * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
+ * and
+ * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
+ * APIs.
*
* Generated from protobuf field repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return \Google\Protobuf\Internal\RepeatedField
@@ -2382,7 +2457,11 @@ public function getLocalInventories()
/**
* 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 [AddLocalInventories][] and [RemoveLocalInventories][] APIs.
+ * be managed by
+ * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
+ * and
+ * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
+ * APIs.
*
* Generated from protobuf field repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param array<\Google\Cloud\Retail\V2\LocalInventory>|\Google\Protobuf\Internal\RepeatedField $var
diff --git a/Retail/src/V2/RejoinUserEventsMetadata.php b/Retail/src/V2/RejoinUserEventsMetadata.php
index c5fc0f638deb..b5215c1b6582 100644
--- a/Retail/src/V2/RejoinUserEventsMetadata.php
+++ b/Retail/src/V2/RejoinUserEventsMetadata.php
@@ -9,7 +9,7 @@
use Google\Protobuf\Internal\GPBUtil;
/**
- * Metadata for RejoinUserEvents method.
+ * Metadata for `RejoinUserEvents` method.
*
* Generated from protobuf message google.cloud.retail.v2.RejoinUserEventsMetadata
*/
diff --git a/Retail/src/V2/RejoinUserEventsRequest.php b/Retail/src/V2/RejoinUserEventsRequest.php
index c3039a1c2a39..34d09a44f4b7 100644
--- a/Retail/src/V2/RejoinUserEventsRequest.php
+++ b/Retail/src/V2/RejoinUserEventsRequest.php
@@ -25,8 +25,8 @@ class RejoinUserEventsRequest extends \Google\Protobuf\Internal\Message
/**
* The type of the user event rejoin to define the scope and range of the user
* events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
+ * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+ * an invalid integer value.
*
* Generated from protobuf field .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
*/
@@ -44,8 +44,8 @@ class RejoinUserEventsRequest extends \Google\Protobuf\Internal\Message
* @type int $user_event_rejoin_scope
* The type of the user event rejoin to define the scope and range of the user
* events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
+ * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+ * an invalid integer value.
* }
*/
public function __construct($data = NULL) {
@@ -84,8 +84,8 @@ public function setParent($var)
/**
* The type of the user event rejoin to define the scope and range of the user
* events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
+ * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+ * an invalid integer value.
*
* Generated from protobuf field .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
* @return int
@@ -98,8 +98,8 @@ public function getUserEventRejoinScope()
/**
* The type of the user event rejoin to define the scope and range of the user
* events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
+ * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+ * an invalid integer value.
*
* Generated from protobuf field .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
* @param int $var
diff --git a/Retail/src/V2/RejoinUserEventsRequest/UserEventRejoinScope.php b/Retail/src/V2/RejoinUserEventsRequest/UserEventRejoinScope.php
index d34f80271db4..c06139c94b78 100644
--- a/Retail/src/V2/RejoinUserEventsRequest/UserEventRejoinScope.php
+++ b/Retail/src/V2/RejoinUserEventsRequest/UserEventRejoinScope.php
@@ -9,11 +9,11 @@
/**
* The scope of user events to be rejoined with the latest product catalog.
* If the rejoining aims at reducing number of unjoined events, set
- * UserEventRejoinScope to UNJOINED_EVENTS.
+ * `UserEventRejoinScope` to `UNJOINED_EVENTS`.
* If the rejoining aims at correcting product catalog information in joined
- * events, set UserEventRejoinScope to JOINED_EVENTS.
- * If all events needs to be rejoined, set UserEventRejoinScope to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED.
+ * events, set `UserEventRejoinScope` to `JOINED_EVENTS`.
+ * If all events needs to be rejoined, set `UserEventRejoinScope` to
+ * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED`.
*
* Protobuf type google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope
*/
diff --git a/Retail/src/V2/RejoinUserEventsResponse.php b/Retail/src/V2/RejoinUserEventsResponse.php
index 97741b5d9700..f6833e5eabac 100644
--- a/Retail/src/V2/RejoinUserEventsResponse.php
+++ b/Retail/src/V2/RejoinUserEventsResponse.php
@@ -9,7 +9,7 @@
use Google\Protobuf\Internal\GPBUtil;
/**
- * Response message for RejoinUserEvents method.
+ * Response message for `RejoinUserEvents` method.
*
* Generated from protobuf message google.cloud.retail.v2.RejoinUserEventsResponse
*/
diff --git a/Retail/src/V2/RemoveControlRequest.php b/Retail/src/V2/RemoveControlRequest.php
index 530fdbbcfea7..396f1198facc 100644
--- a/Retail/src/V2/RemoveControlRequest.php
+++ b/Retail/src/V2/RemoveControlRequest.php
@@ -17,7 +17,7 @@ class RemoveControlRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -38,7 +38,7 @@ class RemoveControlRequest extends \Google\Protobuf\Internal\Message
*
* @type string $serving_config
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
* @type string $control_id
* Required. The id of the control to apply. Assumed to be in the same catalog
* as the serving config.
@@ -51,7 +51,7 @@ public function __construct($data = NULL) {
/**
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -63,7 +63,7 @@ public function getServingConfig()
/**
* Required. The source ServingConfig resource name . Format:
- * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
*
* Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/Retail/src/V2/Rule/TwowaySynonymsAction.php b/Retail/src/V2/Rule/TwowaySynonymsAction.php
index 0672f49d7194..3444e889e7f3 100644
--- a/Retail/src/V2/Rule/TwowaySynonymsAction.php
+++ b/Retail/src/V2/Rule/TwowaySynonymsAction.php
@@ -10,7 +10,7 @@
/**
* Creates a set of terms that will be treated as synonyms of each other.
- * Example: synonyms of "sneakers" and "shoes".
+ * Example: synonyms of "sneakers" and "shoes":
* * "sneakers" will use a synonym of "shoes".
* * "shoes" will use a synonym of "sneakers".
*
diff --git a/Retail/src/V2/SearchRequest.php b/Retail/src/V2/SearchRequest.php
index 21974776fe57..9ba9c92d469b 100644
--- a/Retail/src/V2/SearchRequest.php
+++ b/Retail/src/V2/SearchRequest.php
@@ -21,7 +21,7 @@ class SearchRequest extends \Google\Protobuf\Internal\Message
* `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
* or the name of the legacy placement resource, such as
* `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
- * This field is used to identify the serving configuration name and the set
+ * This field is used to identify the serving config name and the set
* of models that will be used to make the search.
*
* Generated from protobuf field string placement = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -252,7 +252,7 @@ class SearchRequest extends \Google\Protobuf\Internal\Message
* the same as
* [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
@@ -321,7 +321,7 @@ class SearchRequest extends \Google\Protobuf\Internal\Message
* `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
* or the name of the legacy placement resource, such as
* `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
- * This field is used to identify the serving configuration name and the set
+ * This field is used to identify the serving config name and the set
* of models that will be used to make the search.
* @type string $branch
* The branch resource name, such as
@@ -487,7 +487,7 @@ class SearchRequest extends \Google\Protobuf\Internal\Message
* the same as
* [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
@@ -536,7 +536,7 @@ public function __construct($data = NULL) {
* `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
* or the name of the legacy placement resource, such as
* `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
- * This field is used to identify the serving configuration name and the set
+ * This field is used to identify the serving config name and the set
* of models that will be used to make the search.
*
* Generated from protobuf field string placement = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -552,7 +552,7 @@ public function getPlacement()
* `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
* or the name of the legacy placement resource, such as
* `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
- * This field is used to identify the serving configuration name and the set
+ * This field is used to identify the serving config name and the set
* of models that will be used to make the search.
*
* Generated from protobuf field string placement = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -1265,7 +1265,7 @@ public function setVariantRollupKeys($var)
* the same as
* [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
@@ -1285,7 +1285,7 @@ public function getPageCategories()
* the same as
* [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
diff --git a/Retail/src/V2/SearchRequest/FacetSpec.php b/Retail/src/V2/SearchRequest/FacetSpec.php
index b97ef90366c2..a163dcba5b93 100644
--- a/Retail/src/V2/SearchRequest/FacetSpec.php
+++ b/Retail/src/V2/SearchRequest/FacetSpec.php
@@ -23,7 +23,7 @@ class FacetSpec extends \Google\Protobuf\Internal\Message
private $facet_key = null;
/**
* Maximum of facet values that should be returned for this facet. If
- * unspecified, defaults to 20. The maximum allowed value is 300. Values
+ * unspecified, defaults to 50. The maximum allowed value is 300. Values
* above 300 will be coerced to 300.
* If this field is negative, an INVALID_ARGUMENT is returned.
*
@@ -95,7 +95,7 @@ class FacetSpec extends \Google\Protobuf\Internal\Message
* Required. The facet key specification.
* @type int $limit
* Maximum of facet values that should be returned for this facet. If
- * unspecified, defaults to 20. The maximum allowed value is 300. Values
+ * unspecified, defaults to 50. The maximum allowed value is 300. Values
* above 300 will be coerced to 300.
* If this field is negative, an INVALID_ARGUMENT is returned.
* @type array|\Google\Protobuf\Internal\RepeatedField $excluded_filter_keys
@@ -189,7 +189,7 @@ public function setFacetKey($var)
/**
* Maximum of facet values that should be returned for this facet. If
- * unspecified, defaults to 20. The maximum allowed value is 300. Values
+ * unspecified, defaults to 50. The maximum allowed value is 300. Values
* above 300 will be coerced to 300.
* If this field is negative, an INVALID_ARGUMENT is returned.
*
@@ -203,7 +203,7 @@ public function getLimit()
/**
* Maximum of facet values that should be returned for this facet. If
- * unspecified, defaults to 20. The maximum allowed value is 300. Values
+ * unspecified, defaults to 50. The maximum allowed value is 300. Values
* above 300 will be coerced to 300.
* If this field is negative, an INVALID_ARGUMENT is returned.
*
diff --git a/Retail/src/V2/SearchRequest/SearchMode.php b/Retail/src/V2/SearchRequest/SearchMode.php
index 9f13472f89ac..4fea04482a68 100644
--- a/Retail/src/V2/SearchRequest/SearchMode.php
+++ b/Retail/src/V2/SearchRequest/SearchMode.php
@@ -15,8 +15,10 @@ class SearchMode
{
/**
* Default value. In this case both product search and faceted search will
- * be performed. Both [SearchResponse.SearchResult] and
- * [SearchResponse.Facet] will be returned.
+ * be performed. Both
+ * [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult]
+ * and [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet]
+ * will be returned.
*
* Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0;
*/
@@ -24,8 +26,11 @@ class SearchMode
/**
* Only product search will be performed. The faceted search will be
* disabled.
- * Only [SearchResponse.SearchResult] will be returned.
- * [SearchResponse.Facet] will not be returned, even if
+ * Only
+ * [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult]
+ * will be returned.
+ * [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will
+ * not be returned, even if
* [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs]
* or
* [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec]
@@ -42,7 +47,9 @@ class SearchMode
* and
* [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec]
* should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
- * [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
+ * [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will
+ * be returned.
+ * [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult]
* will not be returned.
*
* Generated from protobuf enum FACETED_SEARCH_ONLY = 2;
diff --git a/Retail/src/V2/ServingConfig.php b/Retail/src/V2/ServingConfig.php
index e082ae122cfb..8fc68ced18f7 100644
--- a/Retail/src/V2/ServingConfig.php
+++ b/Retail/src/V2/ServingConfig.php
@@ -52,12 +52,12 @@ class ServingConfig extends \Google\Protobuf\Internal\Message
* highest-priced items first. This setting could result in a decrease in
* click-through and conversion rates.
* Allowed values are:
- * * 'no-price-reranking'
- * * 'low-price-raranking'
- * * 'medium-price-reranking'
- * * 'high-price-reranking'
+ * * `no-price-reranking`
+ * * `low-price-raranking`
+ * * `medium-price-reranking`
+ * * `high-price-reranking`
* If not specified, we choose default based on model type. Default value:
- * 'no-price-reranking'.
+ * `no-price-reranking`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
@@ -196,14 +196,14 @@ class ServingConfig extends \Google\Protobuf\Internal\Message
private $ignore_control_ids;
/**
* How much diversity to use in recommendation model results e.g.
- * 'medium-diversity' or 'high-diversity'. Currently supported values:
- * * 'no-diversity'
- * * 'low-diversity'
- * * 'medium-diversity'
- * * 'high-diversity'
- * * 'auto-diversity'
+ * `medium-diversity` or `high-diversity`. Currently supported values:
+ * * `no-diversity`
+ * * `low-diversity`
+ * * `medium-diversity`
+ * * `high-diversity`
+ * * `auto-diversity`
* If not specified, we choose default based on recommendation model
- * type. Default value: 'no-diversity'.
+ * type. Default value: `no-diversity`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
@@ -212,12 +212,20 @@ class ServingConfig extends \Google\Protobuf\Internal\Message
*/
private $diversity_level = '';
/**
- * Whether to add additional category filters on the 'similar-items' model.
+ * What kind of diversity to use - data driven or rule based. If unset,
+ * the server behavior defaults to
+ * [RULE_BASED_DIVERSITY][google.cloud.retail.v2.ServingConfig.DiversityType.RULE_BASED_DIVERSITY].
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.ServingConfig.DiversityType diversity_type = 20;
+ */
+ private $diversity_type = 0;
+ /**
+ * Whether to add additional category filters on the `similar-items` model.
* If not specified, we enable it by default.
* Allowed values are:
- * * 'no-category-match': No additional filtering of original results from
+ * * `no-category-match`: No additional filtering of original results from
* the model and the customer's filters.
- * * 'relaxed-category-match': Only keep results with categories that match
+ * * `relaxed-category-match`: Only keep results with categories that match
* at least one item categories in the PredictRequests's context item.
* * If customer also sends filters in the PredictRequest, then the results
* will satisfy both conditions (user given and category match).
@@ -283,12 +291,12 @@ class ServingConfig extends \Google\Protobuf\Internal\Message
* highest-priced items first. This setting could result in a decrease in
* click-through and conversion rates.
* Allowed values are:
- * * 'no-price-reranking'
- * * 'low-price-raranking'
- * * 'medium-price-reranking'
- * * 'high-price-reranking'
+ * * `no-price-reranking`
+ * * `low-price-raranking`
+ * * `medium-price-reranking`
+ * * `high-price-reranking`
* If not specified, we choose default based on model type. Default value:
- * 'no-price-reranking'.
+ * `no-price-reranking`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
@@ -383,24 +391,28 @@ class ServingConfig extends \Google\Protobuf\Internal\Message
* [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
* @type string $diversity_level
* How much diversity to use in recommendation model results e.g.
- * 'medium-diversity' or 'high-diversity'. Currently supported values:
- * * 'no-diversity'
- * * 'low-diversity'
- * * 'medium-diversity'
- * * 'high-diversity'
- * * 'auto-diversity'
+ * `medium-diversity` or `high-diversity`. Currently supported values:
+ * * `no-diversity`
+ * * `low-diversity`
+ * * `medium-diversity`
+ * * `high-diversity`
+ * * `auto-diversity`
* If not specified, we choose default based on recommendation model
- * type. Default value: 'no-diversity'.
+ * type. Default value: `no-diversity`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
+ * @type int $diversity_type
+ * What kind of diversity to use - data driven or rule based. If unset,
+ * the server behavior defaults to
+ * [RULE_BASED_DIVERSITY][google.cloud.retail.v2.ServingConfig.DiversityType.RULE_BASED_DIVERSITY].
* @type string $enable_category_filter_level
- * Whether to add additional category filters on the 'similar-items' model.
+ * Whether to add additional category filters on the `similar-items` model.
* If not specified, we enable it by default.
* Allowed values are:
- * * 'no-category-match': No additional filtering of original results from
+ * * `no-category-match`: No additional filtering of original results from
* the model and the customer's filters.
- * * 'relaxed-category-match': Only keep results with categories that match
+ * * `relaxed-category-match`: Only keep results with categories that match
* at least one item categories in the PredictRequests's context item.
* * If customer also sends filters in the PredictRequest, then the results
* will satisfy both conditions (user given and category match).
@@ -537,12 +549,12 @@ public function setModelId($var)
* highest-priced items first. This setting could result in a decrease in
* click-through and conversion rates.
* Allowed values are:
- * * 'no-price-reranking'
- * * 'low-price-raranking'
- * * 'medium-price-reranking'
- * * 'high-price-reranking'
+ * * `no-price-reranking`
+ * * `low-price-raranking`
+ * * `medium-price-reranking`
+ * * `high-price-reranking`
* If not specified, we choose default based on model type. Default value:
- * 'no-price-reranking'.
+ * `no-price-reranking`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
@@ -562,12 +574,12 @@ public function getPriceRerankingLevel()
* highest-priced items first. This setting could result in a decrease in
* click-through and conversion rates.
* Allowed values are:
- * * 'no-price-reranking'
- * * 'low-price-raranking'
- * * 'medium-price-reranking'
- * * 'high-price-reranking'
+ * * `no-price-reranking`
+ * * `low-price-raranking`
+ * * `medium-price-reranking`
+ * * `high-price-reranking`
* If not specified, we choose default based on model type. Default value:
- * 'no-price-reranking'.
+ * `no-price-reranking`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
@@ -994,14 +1006,14 @@ public function setIgnoreControlIds($var)
/**
* How much diversity to use in recommendation model results e.g.
- * 'medium-diversity' or 'high-diversity'. Currently supported values:
- * * 'no-diversity'
- * * 'low-diversity'
- * * 'medium-diversity'
- * * 'high-diversity'
- * * 'auto-diversity'
+ * `medium-diversity` or `high-diversity`. Currently supported values:
+ * * `no-diversity`
+ * * `low-diversity`
+ * * `medium-diversity`
+ * * `high-diversity`
+ * * `auto-diversity`
* If not specified, we choose default based on recommendation model
- * type. Default value: 'no-diversity'.
+ * type. Default value: `no-diversity`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
@@ -1016,14 +1028,14 @@ public function getDiversityLevel()
/**
* How much diversity to use in recommendation model results e.g.
- * 'medium-diversity' or 'high-diversity'. Currently supported values:
- * * 'no-diversity'
- * * 'low-diversity'
- * * 'medium-diversity'
- * * 'high-diversity'
- * * 'auto-diversity'
+ * `medium-diversity` or `high-diversity`. Currently supported values:
+ * * `no-diversity`
+ * * `low-diversity`
+ * * `medium-diversity`
+ * * `high-diversity`
+ * * `auto-diversity`
* If not specified, we choose default based on recommendation model
- * type. Default value: 'no-diversity'.
+ * type. Default value: `no-diversity`.
* Can only be set if
* [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is
* [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
@@ -1041,12 +1053,42 @@ public function setDiversityLevel($var)
}
/**
- * Whether to add additional category filters on the 'similar-items' model.
+ * What kind of diversity to use - data driven or rule based. If unset,
+ * the server behavior defaults to
+ * [RULE_BASED_DIVERSITY][google.cloud.retail.v2.ServingConfig.DiversityType.RULE_BASED_DIVERSITY].
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.ServingConfig.DiversityType diversity_type = 20;
+ * @return int
+ */
+ public function getDiversityType()
+ {
+ return $this->diversity_type;
+ }
+
+ /**
+ * What kind of diversity to use - data driven or rule based. If unset,
+ * the server behavior defaults to
+ * [RULE_BASED_DIVERSITY][google.cloud.retail.v2.ServingConfig.DiversityType.RULE_BASED_DIVERSITY].
+ *
+ * Generated from protobuf field .google.cloud.retail.v2.ServingConfig.DiversityType diversity_type = 20;
+ * @param int $var
+ * @return $this
+ */
+ public function setDiversityType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Retail\V2\ServingConfig\DiversityType::class);
+ $this->diversity_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether to add additional category filters on the `similar-items` model.
* If not specified, we enable it by default.
* Allowed values are:
- * * 'no-category-match': No additional filtering of original results from
+ * * `no-category-match`: No additional filtering of original results from
* the model and the customer's filters.
- * * 'relaxed-category-match': Only keep results with categories that match
+ * * `relaxed-category-match`: Only keep results with categories that match
* at least one item categories in the PredictRequests's context item.
* * If customer also sends filters in the PredictRequest, then the results
* will satisfy both conditions (user given and category match).
@@ -1063,12 +1105,12 @@ public function getEnableCategoryFilterLevel()
}
/**
- * Whether to add additional category filters on the 'similar-items' model.
+ * Whether to add additional category filters on the `similar-items` model.
* If not specified, we enable it by default.
* Allowed values are:
- * * 'no-category-match': No additional filtering of original results from
+ * * `no-category-match`: No additional filtering of original results from
* the model and the customer's filters.
- * * 'relaxed-category-match': Only keep results with categories that match
+ * * `relaxed-category-match`: Only keep results with categories that match
* at least one item categories in the PredictRequests's context item.
* * If customer also sends filters in the PredictRequest, then the results
* will satisfy both conditions (user given and category match).
diff --git a/Retail/src/V2/ServingConfig/DiversityType.php b/Retail/src/V2/ServingConfig/DiversityType.php
new file mode 100644
index 000000000000..f2c56a238e12
--- /dev/null
+++ b/Retail/src/V2/ServingConfig/DiversityType.php
@@ -0,0 +1,62 @@
+google.cloud.retail.v2.ServingConfig.DiversityType
+ */
+class DiversityType
+{
+ /**
+ * Default value.
+ *
+ * Generated from protobuf enum DIVERSITY_TYPE_UNSPECIFIED = 0;
+ */
+ const DIVERSITY_TYPE_UNSPECIFIED = 0;
+ /**
+ * Rule based diversity.
+ *
+ * Generated from protobuf enum RULE_BASED_DIVERSITY = 2;
+ */
+ const RULE_BASED_DIVERSITY = 2;
+ /**
+ * Data driven diversity.
+ *
+ * Generated from protobuf enum DATA_DRIVEN_DIVERSITY = 3;
+ */
+ const DATA_DRIVEN_DIVERSITY = 3;
+
+ private static $valueToName = [
+ self::DIVERSITY_TYPE_UNSPECIFIED => 'DIVERSITY_TYPE_UNSPECIFIED',
+ self::RULE_BASED_DIVERSITY => 'RULE_BASED_DIVERSITY',
+ self::DATA_DRIVEN_DIVERSITY => 'DATA_DRIVEN_DIVERSITY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/Retail/src/V2/UserEvent.php b/Retail/src/V2/UserEvent.php
index 0b6ab088c84a..a7f243f0fad6 100644
--- a/Retail/src/V2/UserEvent.php
+++ b/Retail/src/V2/UserEvent.php
@@ -224,7 +224,7 @@ class UserEvent extends \Google\Protobuf\Internal\Message
/**
* The categories associated with a category page.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
@@ -429,7 +429,7 @@ class UserEvent extends \Google\Protobuf\Internal\Message
* @type array|\Google\Protobuf\Internal\RepeatedField $page_categories
* The categories associated with a category page.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
@@ -1119,7 +1119,7 @@ public function setOffset($var)
/**
* The categories associated with a category page.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
@@ -1141,7 +1141,7 @@ public function getPageCategories()
/**
* The categories associated with a category page.
* To represent full path of category, use '>' sign to separate different
- * hierarchies. If '>' is part of the category name, please replace it with
+ * hierarchies. If '>' is part of the category name, replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
diff --git a/Retail/src/V2/WriteUserEventRequest.php b/Retail/src/V2/WriteUserEventRequest.php
index ece0c8d2152d..32de8a052cb3 100644
--- a/Retail/src/V2/WriteUserEventRequest.php
+++ b/Retail/src/V2/WriteUserEventRequest.php
@@ -28,6 +28,15 @@ class WriteUserEventRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.retail.v2.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED];
*/
private $user_event = null;
+ /**
+ * If set to true, the user event will be written asynchronously after
+ * validation, and the API will respond without waiting for the write.
+ * Therefore, silent failures can occur even if the API returns success. In
+ * case of silent failures, error messages can be found in Stackdriver logs.
+ *
+ * Generated from protobuf field bool write_async = 3;
+ */
+ private $write_async = false;
/**
* Constructor.
@@ -40,6 +49,11 @@ class WriteUserEventRequest extends \Google\Protobuf\Internal\Message
* `projects/1234/locations/global/catalogs/default_catalog`.
* @type \Google\Cloud\Retail\V2\UserEvent $user_event
* Required. User event to write.
+ * @type bool $write_async
+ * If set to true, the user event will be written asynchronously after
+ * validation, and the API will respond without waiting for the write.
+ * Therefore, silent failures can occur even if the API returns success. In
+ * case of silent failures, error messages can be found in Stackdriver logs.
* }
*/
public function __construct($data = NULL) {
@@ -111,5 +125,37 @@ public function setUserEvent($var)
return $this;
}
+ /**
+ * If set to true, the user event will be written asynchronously after
+ * validation, and the API will respond without waiting for the write.
+ * Therefore, silent failures can occur even if the API returns success. In
+ * case of silent failures, error messages can be found in Stackdriver logs.
+ *
+ * Generated from protobuf field bool write_async = 3;
+ * @return bool
+ */
+ public function getWriteAsync()
+ {
+ return $this->write_async;
+ }
+
+ /**
+ * If set to true, the user event will be written asynchronously after
+ * validation, and the API will respond without waiting for the write.
+ * Therefore, silent failures can occur even if the API returns success. In
+ * case of silent failures, error messages can be found in Stackdriver logs.
+ *
+ * Generated from protobuf field bool write_async = 3;
+ * @param bool $var
+ * @return $this
+ */
+ public function setWriteAsync($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->write_async = $var;
+
+ return $this;
+ }
+
}
diff --git a/Retail/src/V2/resources/catalog_service_rest_client_config.php b/Retail/src/V2/resources/catalog_service_rest_client_config.php
index 587d721e4ba7..2963e594633e 100644
--- a/Retail/src/V2/resources/catalog_service_rest_client_config.php
+++ b/Retail/src/V2/resources/catalog_service_rest_client_config.php
@@ -184,4 +184,5 @@
],
],
],
+ 'numericEnums' => true,
];
diff --git a/Retail/src/V2/resources/completion_service_rest_client_config.php b/Retail/src/V2/resources/completion_service_rest_client_config.php
index 97abbf12841c..25fc8ec8bef3 100644
--- a/Retail/src/V2/resources/completion_service_rest_client_config.php
+++ b/Retail/src/V2/resources/completion_service_rest_client_config.php
@@ -76,4 +76,5 @@
],
],
],
+ 'numericEnums' => true,
];
diff --git a/Retail/src/V2/resources/control_service_rest_client_config.php b/Retail/src/V2/resources/control_service_rest_client_config.php
index 8b1961bbc307..ab914eb7181b 100644
--- a/Retail/src/V2/resources/control_service_rest_client_config.php
+++ b/Retail/src/V2/resources/control_service_rest_client_config.php
@@ -114,4 +114,5 @@
],
],
],
+ 'numericEnums' => true,
];
diff --git a/Retail/src/V2/resources/prediction_service_rest_client_config.php b/Retail/src/V2/resources/prediction_service_rest_client_config.php
index 4a687abdde0f..d0ebf31ff53e 100644
--- a/Retail/src/V2/resources/prediction_service_rest_client_config.php
+++ b/Retail/src/V2/resources/prediction_service_rest_client_config.php
@@ -72,4 +72,5 @@
],
],
],
+ 'numericEnums' => true,
];
diff --git a/Retail/src/V2/resources/product_service_rest_client_config.php b/Retail/src/V2/resources/product_service_rest_client_config.php
index a8f13bb0a295..11e7dbaf281c 100644
--- a/Retail/src/V2/resources/product_service_rest_client_config.php
+++ b/Retail/src/V2/resources/product_service_rest_client_config.php
@@ -187,4 +187,5 @@
],
],
],
+ 'numericEnums' => true,
];
diff --git a/Retail/src/V2/resources/search_service_rest_client_config.php b/Retail/src/V2/resources/search_service_rest_client_config.php
index 1fe6dc5bffb2..20b8e69fb776 100644
--- a/Retail/src/V2/resources/search_service_rest_client_config.php
+++ b/Retail/src/V2/resources/search_service_rest_client_config.php
@@ -72,4 +72,5 @@
],
],
],
+ 'numericEnums' => true,
];
diff --git a/Retail/src/V2/resources/serving_config_service_rest_client_config.php b/Retail/src/V2/resources/serving_config_service_rest_client_config.php
index 6f8c07188926..90fd661ab23f 100644
--- a/Retail/src/V2/resources/serving_config_service_rest_client_config.php
+++ b/Retail/src/V2/resources/serving_config_service_rest_client_config.php
@@ -138,4 +138,5 @@
],
],
],
+ 'numericEnums' => true,
];
diff --git a/Retail/src/V2/resources/user_event_service_rest_client_config.php b/Retail/src/V2/resources/user_event_service_rest_client_config.php
index d1e394f258f9..3bf6445f59a9 100644
--- a/Retail/src/V2/resources/user_event_service_rest_client_config.php
+++ b/Retail/src/V2/resources/user_event_service_rest_client_config.php
@@ -112,4 +112,5 @@
],
],
],
+ 'numericEnums' => true,
];