diff --git a/google/cloud/retail_v2/services/catalog_service/async_client.py b/google/cloud/retail_v2/services/catalog_service/async_client.py index 195b98f3..a6a08b4b 100644 --- a/google/cloud/retail_v2/services/catalog_service/async_client.py +++ b/google/cloud/retail_v2/services/catalog_service/async_client.py @@ -753,7 +753,7 @@ async def sample_get_completion_config(): method. name (:class:`str`): 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`` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/retail_v2/services/catalog_service/client.py b/google/cloud/retail_v2/services/catalog_service/client.py index 2ece1ea5..20e50388 100644 --- a/google/cloud/retail_v2/services/catalog_service/client.py +++ b/google/cloud/retail_v2/services/catalog_service/client.py @@ -1038,7 +1038,7 @@ def sample_get_completion_config(): method. name (str): 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`` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/retail_v2/services/completion_service/async_client.py b/google/cloud/retail_v2/services/completion_service/async_client.py index 37392b0d..4ee0c37d 100644 --- a/google/cloud/retail_v2/services/completion_service/async_client.py +++ b/google/cloud/retail_v2/services/completion_service/async_client.py @@ -55,8 +55,8 @@ class CompletionServiceAsyncClient: """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. + enabled. Enable Retail Search on Cloud Console before using this + feature. """ _client: CompletionServiceClient @@ -231,8 +231,8 @@ async def complete_query( r"""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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. .. code-block:: python @@ -319,8 +319,8 @@ async def import_completion_data( imported suggestions 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. .. code-block:: python diff --git a/google/cloud/retail_v2/services/completion_service/client.py b/google/cloud/retail_v2/services/completion_service/client.py index 7e5d9bab..3325e224 100644 --- a/google/cloud/retail_v2/services/completion_service/client.py +++ b/google/cloud/retail_v2/services/completion_service/client.py @@ -95,8 +95,8 @@ def get_transport_class( class CompletionServiceClient(metaclass=CompletionServiceClientMeta): """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. + enabled. Enable Retail Search on Cloud Console before using this + feature. """ @staticmethod @@ -458,8 +458,8 @@ def complete_query( r"""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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. .. code-block:: python @@ -547,8 +547,8 @@ def import_completion_data( imported suggestions 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. .. code-block:: python diff --git a/google/cloud/retail_v2/services/completion_service/transports/grpc.py b/google/cloud/retail_v2/services/completion_service/transports/grpc.py index dbf1c172..be7db0d2 100644 --- a/google/cloud/retail_v2/services/completion_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/completion_service/transports/grpc.py @@ -33,8 +33,8 @@ class CompletionServiceGrpcTransport(CompletionServiceTransport): 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -259,8 +259,8 @@ def complete_query( 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. Returns: Callable[[~.CompleteQueryRequest], @@ -295,8 +295,8 @@ def import_completion_data( imported suggestions 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. Returns: Callable[[~.ImportCompletionDataRequest], diff --git a/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py index 8a2854d8..09e1d672 100644 --- a/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py @@ -34,8 +34,8 @@ class CompletionServiceGrpcAsyncIOTransport(CompletionServiceTransport): 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -264,8 +264,8 @@ def complete_query( 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. Returns: Callable[[~.CompleteQueryRequest], @@ -300,8 +300,8 @@ def import_completion_data( imported suggestions 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. Returns: Callable[[~.ImportCompletionDataRequest], diff --git a/google/cloud/retail_v2/services/product_service/async_client.py b/google/cloud/retail_v2/services/product_service/async_client.py index 48557666..3ce9d76d 100644 --- a/google/cloud/retail_v2/services/product_service/async_client.py +++ b/google/cloud/retail_v2/services/product_service/async_client.py @@ -1000,10 +1000,10 @@ async def set_inventory( 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 - [Product][google.cloud.retail.v2.Product] queried by + 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 [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. @@ -1012,10 +1012,10 @@ async def set_inventory( [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) 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 + the specified inventory field value(s) overwrite any existing + value(s) while ignoring the last update time for this field. + Furthermore, the last 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] @@ -1023,12 +1023,12 @@ async def set_inventory( 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], @@ -1036,16 +1036,20 @@ async def set_inventory( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1263,16 +1267,19 @@ async def add_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1415,16 +1422,19 @@ async def remove_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1576,16 +1586,19 @@ async def add_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1734,16 +1747,19 @@ async def remove_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python diff --git a/google/cloud/retail_v2/services/product_service/client.py b/google/cloud/retail_v2/services/product_service/client.py index 8dc56a9d..ca411ce1 100644 --- a/google/cloud/retail_v2/services/product_service/client.py +++ b/google/cloud/retail_v2/services/product_service/client.py @@ -1244,10 +1244,10 @@ def set_inventory( 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 - [Product][google.cloud.retail.v2.Product] queried by + 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 [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. @@ -1256,10 +1256,10 @@ def set_inventory( [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) 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 + the specified inventory field value(s) overwrite any existing + value(s) while ignoring the last update time for this field. + Furthermore, the last 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] @@ -1267,12 +1267,12 @@ def set_inventory( 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], @@ -1280,16 +1280,20 @@ def set_inventory( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1507,16 +1511,19 @@ def add_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1659,16 +1666,19 @@ def remove_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1822,16 +1832,19 @@ def add_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python @@ -1980,16 +1993,19 @@ def remove_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. .. code-block:: python diff --git a/google/cloud/retail_v2/services/product_service/transports/grpc.py b/google/cloud/retail_v2/services/product_service/transports/grpc.py index 43e5ed53..e2a68ded 100644 --- a/google/cloud/retail_v2/services/product_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/product_service/transports/grpc.py @@ -428,10 +428,10 @@ def set_inventory( 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 - [Product][google.cloud.retail.v2.Product] queried by + 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 [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. @@ -440,10 +440,10 @@ def set_inventory( [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) 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 + the specified inventory field value(s) overwrite any existing + value(s) while ignoring the last update time for this field. + Furthermore, the last 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] @@ -451,12 +451,12 @@ def set_inventory( 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], @@ -464,16 +464,20 @@ def set_inventory( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.SetInventoryRequest], @@ -515,16 +519,19 @@ def add_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.AddFulfillmentPlacesRequest], @@ -566,16 +573,19 @@ def remove_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.RemoveFulfillmentPlacesRequest], @@ -626,16 +636,19 @@ def add_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.AddLocalInventoriesRequest], @@ -683,16 +696,19 @@ def remove_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.RemoveLocalInventoriesRequest], diff --git a/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py index 30228240..b68ed997 100644 --- a/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py @@ -442,10 +442,10 @@ def set_inventory( 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 - [Product][google.cloud.retail.v2.Product] queried by + 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 [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. @@ -454,10 +454,10 @@ def set_inventory( [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) 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 + the specified inventory field value(s) overwrite any existing + value(s) while ignoring the last update time for this field. + Furthermore, the last 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] @@ -465,12 +465,12 @@ def set_inventory( 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], @@ -478,16 +478,20 @@ def set_inventory( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.SetInventoryRequest], @@ -530,16 +534,19 @@ def add_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.AddFulfillmentPlacesRequest], @@ -582,16 +589,19 @@ def remove_fulfillment_places( 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.RemoveFulfillmentPlacesRequest], @@ -643,16 +653,19 @@ def add_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.AddLocalInventoriesRequest], @@ -701,16 +714,19 @@ def remove_local_inventories( [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. + enabled. Enable Retail Search on Cloud Console before using this + feature. Returns: Callable[[~.RemoveLocalInventoriesRequest], diff --git a/google/cloud/retail_v2/services/search_service/async_client.py b/google/cloud/retail_v2/services/search_service/async_client.py index a58609f4..053529e1 100644 --- a/google/cloud/retail_v2/services/search_service/async_client.py +++ b/google/cloud/retail_v2/services/search_service/async_client.py @@ -53,8 +53,8 @@ class SearchServiceAsyncClient: """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. + enabled. Enable Retail Search on Cloud Console before using this + feature. """ _client: SearchServiceClient @@ -230,8 +230,8 @@ async def search( ) -> pagers.SearchAsyncPager: r"""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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. .. code-block:: python diff --git a/google/cloud/retail_v2/services/search_service/client.py b/google/cloud/retail_v2/services/search_service/client.py index 9ada1b58..33645bf1 100644 --- a/google/cloud/retail_v2/services/search_service/client.py +++ b/google/cloud/retail_v2/services/search_service/client.py @@ -91,8 +91,8 @@ def get_transport_class( class SearchServiceClient(metaclass=SearchServiceClientMeta): """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. + enabled. Enable Retail Search on Cloud Console before using this + feature. """ @staticmethod @@ -481,8 +481,8 @@ def search( ) -> pagers.SearchPager: r"""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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. .. code-block:: python diff --git a/google/cloud/retail_v2/services/search_service/transports/grpc.py b/google/cloud/retail_v2/services/search_service/transports/grpc.py index b240098b..23e4fbe2 100644 --- a/google/cloud/retail_v2/services/search_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/search_service/transports/grpc.py @@ -32,8 +32,8 @@ class SearchServiceGrpcTransport(SearchServiceTransport): 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -239,8 +239,8 @@ def search( 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. Returns: Callable[[~.SearchRequest], diff --git a/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py index ff093997..fd801efb 100644 --- a/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py @@ -33,8 +33,8 @@ class SearchServiceGrpcAsyncIOTransport(SearchServiceTransport): 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. + enabled. Enable Retail Search on Cloud Console before using this + feature. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -244,8 +244,8 @@ def search( 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. + Search enabled. Enable Retail Search on Cloud Console + before using this feature. Returns: Callable[[~.SearchRequest], diff --git a/google/cloud/retail_v2/services/serving_config_service/async_client.py b/google/cloud/retail_v2/services/serving_config_service/async_client.py index 1f30d92c..a627f7ea 100644 --- a/google/cloud/retail_v2/services/serving_config_service/async_client.py +++ b/google/cloud/retail_v2/services/serving_config_service/async_client.py @@ -410,7 +410,7 @@ async def sample_delete_serving_config(): name (:class:`str`): 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}`` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -634,7 +634,7 @@ async def sample_get_serving_config(): name (:class:`str`): 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}`` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -741,7 +741,7 @@ async def sample_list_serving_configs(): method. parent (:class:`str`): Required. The catalog resource name. Format: - projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + ``projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -862,7 +862,7 @@ async def sample_add_control(): serving_config (:class:`str`): 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}`` This corresponds to the ``serving_config`` field on the ``request`` instance; if ``request`` is provided, this @@ -973,7 +973,7 @@ async def sample_remove_control(): serving_config (:class:`str`): 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}`` This corresponds to the ``serving_config`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/retail_v2/services/serving_config_service/client.py b/google/cloud/retail_v2/services/serving_config_service/client.py index a65383ee..fc8d8ee2 100644 --- a/google/cloud/retail_v2/services/serving_config_service/client.py +++ b/google/cloud/retail_v2/services/serving_config_service/client.py @@ -656,7 +656,7 @@ def sample_delete_serving_config(): name (str): 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}`` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -880,7 +880,7 @@ def sample_get_serving_config(): name (str): 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}`` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -987,7 +987,7 @@ def sample_list_serving_configs(): method. parent (str): Required. The catalog resource name. Format: - projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + ``projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1108,7 +1108,7 @@ def sample_add_control(): serving_config (str): 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}`` This corresponds to the ``serving_config`` field on the ``request`` instance; if ``request`` is provided, this @@ -1219,7 +1219,7 @@ def sample_remove_control(): serving_config (str): 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}`` This corresponds to the ``serving_config`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/retail_v2/services/user_event_service/async_client.py b/google/cloud/retail_v2/services/user_event_service/async_client.py index e5191b95..9f675248 100644 --- a/google/cloud/retail_v2/services/user_event_service/async_client.py +++ b/google/cloud/retail_v2/services/user_event_service/async_client.py @@ -350,6 +350,7 @@ async def sample_collect_user_event(): # Initialize request argument(s) request = retail_v2.CollectUserEventRequest( + prebuilt_rule="prebuilt_rule_value", parent="parent_value", user_event="user_event_value", ) @@ -686,15 +687,15 @@ async def rejoin_user_events( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: - r"""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 + r"""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. diff --git a/google/cloud/retail_v2/services/user_event_service/client.py b/google/cloud/retail_v2/services/user_event_service/client.py index 068feb92..01b33aac 100644 --- a/google/cloud/retail_v2/services/user_event_service/client.py +++ b/google/cloud/retail_v2/services/user_event_service/client.py @@ -602,6 +602,7 @@ def sample_collect_user_event(): # Initialize request argument(s) request = retail_v2.CollectUserEventRequest( + prebuilt_rule="prebuilt_rule_value", parent="parent_value", user_event="user_event_value", ) @@ -921,15 +922,15 @@ def rejoin_user_events( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: - r"""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 + r"""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. diff --git a/google/cloud/retail_v2/services/user_event_service/transports/grpc.py b/google/cloud/retail_v2/services/user_event_service/transports/grpc.py index d0fdb388..b9f15510 100644 --- a/google/cloud/retail_v2/services/user_event_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/user_event_service/transports/grpc.py @@ -378,15 +378,15 @@ def rejoin_user_events( ]: r"""Return a callable for the rejoin user events method over gRPC. - 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 + 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. diff --git a/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py index 854c4c63..f6ad1c49 100644 --- a/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py @@ -392,15 +392,15 @@ def rejoin_user_events( ]: r"""Return a callable for the rejoin user events method over gRPC. - 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 + 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. diff --git a/google/cloud/retail_v2/types/catalog.py b/google/cloud/retail_v2/types/catalog.py index c9cedacf..b34d9f3a 100644 --- a/google/cloud/retail_v2/types/catalog.py +++ b/google/cloud/retail_v2/types/catalog.py @@ -132,14 +132,14 @@ class CatalogAttribute(proto.Message): 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. @@ -154,6 +154,8 @@ class CatalogAttribute(proto.Message): 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. dynamic_facetable_option (google.cloud.retail_v2.types.CatalogAttribute.DynamicFacetableOption): If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED @@ -161,6 +163,8 @@ class CatalogAttribute(proto.Message): [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. searchable_option (google.cloud.retail_v2.types.CatalogAttribute.SearchableOption): When [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] @@ -173,6 +177,16 @@ class CatalogAttribute(proto.Message): [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. + exact_searchable_option (google.cloud.retail_v2.types.CatalogAttribute.ExactSearchableOption): + 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. + retrievable_option (google.cloud.retail_v2.types.CatalogAttribute.RetrievableOption): + If RETRIEVABLE_ENABLED, attribute values are retrievable in + the search results. """ class AttributeType(proto.Enum): @@ -201,6 +215,20 @@ class SearchableOption(proto.Enum): SEARCHABLE_ENABLED = 1 SEARCHABLE_DISABLED = 2 + class ExactSearchableOption(proto.Enum): + r"""The status of the exact-searchable option of a catalog + attribute. + """ + EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 + EXACT_SEARCHABLE_ENABLED = 1 + EXACT_SEARCHABLE_DISABLED = 2 + + class RetrievableOption(proto.Enum): + r"""The status of the retrievable option of a catalog attribute.""" + RETRIEVABLE_OPTION_UNSPECIFIED = 0 + RETRIEVABLE_ENABLED = 1 + RETRIEVABLE_DISABLED = 2 + key: str = proto.Field( proto.STRING, number=1, @@ -229,6 +257,16 @@ class SearchableOption(proto.Enum): number=7, enum=SearchableOption, ) + exact_searchable_option: ExactSearchableOption = proto.Field( + proto.ENUM, + number=11, + enum=ExactSearchableOption, + ) + retrievable_option: RetrievableOption = proto.Field( + proto.ENUM, + number=12, + enum=RetrievableOption, + ) class AttributesConfig(proto.Message): diff --git a/google/cloud/retail_v2/types/catalog_service.py b/google/cloud/retail_v2/types/catalog_service.py index 9a9b70c4..639de7d0 100644 --- a/google/cloud/retail_v2/types/catalog_service.py +++ b/google/cloud/retail_v2/types/catalog_service.py @@ -261,7 +261,7 @@ class GetCompletionConfigRequest(proto.Message): Attributes: name (str): 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`` """ name: str = proto.Field( diff --git a/google/cloud/retail_v2/types/common.py b/google/cloud/retail_v2/types/common.py index bf9d4b64..fe2d8c1a 100644 --- a/google/cloud/retail_v2/types/common.py +++ b/google/cloud/retail_v2/types/common.py @@ -92,9 +92,9 @@ class QueryTerm(proto.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. + considered as one term. 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. full_match (bool): Whether this is supposed to be a full or partial match. @@ -315,7 +315,7 @@ class RedirectAction(proto.Message): class TwowaySynonymsAction(proto.Message): r"""Creates a set of terms that will be treated as synonyms of each - other. Example: synonyms of "sneakers" and "shoes". + other. Example: synonyms of "sneakers" and "shoes": - "sneakers" will use a synonym of "shoes". - "shoes" will use a synonym of "sneakers". diff --git a/google/cloud/retail_v2/types/completion_service.py b/google/cloud/retail_v2/types/completion_service.py index af0a5dbb..57c1e917 100644 --- a/google/cloud/retail_v2/types/completion_service.py +++ b/google/cloud/retail_v2/types/completion_service.py @@ -65,8 +65,10 @@ class CompleteQueryRequest(proto.Message): Languages `__. The maximum number of language codes is 3. device_type (str): - The device type context for completion suggestions. It is - useful to apply different suggestions on different device + 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. diff --git a/google/cloud/retail_v2/types/control.py b/google/cloud/retail_v2/types/control.py index 14a46987..36926f6f 100644 --- a/google/cloud/retail_v2/types/control.py +++ b/google/cloud/retail_v2/types/control.py @@ -55,8 +55,8 @@ class Control(proto.Message): error is thrown. associated_serving_config_ids (MutableSequence[str]): Output only. List of [serving - configuration][google.cloud.retail.v2.ServingConfig] ids - that are associated with this control in the same + 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 diff --git a/google/cloud/retail_v2/types/prediction_service.py b/google/cloud/retail_v2/types/prediction_service.py index 097022b0..8aea7008 100644 --- a/google/cloud/retail_v2/types/prediction_service.py +++ b/google/cloud/retail_v2/types/prediction_service.py @@ -43,7 +43,7 @@ class PredictRequest(proto.Message): 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] + information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at @@ -103,12 +103,11 @@ class PredictRequest(proto.Message): - 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. + 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 @@ -136,7 +135,7 @@ class PredictRequest(proto.Message): '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 given the user's + 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) diff --git a/google/cloud/retail_v2/types/product.py b/google/cloud/retail_v2/types/product.py index 36e09a66..1225ab63 100644 --- a/google/cloud/retail_v2/types/product.py +++ b/google/cloud/retail_v2/types/product.py @@ -46,6 +46,15 @@ class Product(proto.Message): expire_time (google.protobuf.timestamp_pb2.Timestamp): The timestamp when this product becomes unavailable for [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 @@ -69,7 +78,16 @@ class Product(proto.Message): This field is a member of `oneof`_ ``expiration``. ttl (google.protobuf.duration_pb2.Duration): - 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 @@ -180,7 +198,7 @@ class Product(proto.Message): To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, - please replace it with other character(s). + replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> @@ -316,6 +334,12 @@ class Product(proto.Message): [Product][google.cloud.retail.v2.Product] becomes available for [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]. availability (google.cloud.retail_v2.types.Product.Availability): The online availability of the [Product][google.cloud.retail.v2.Product]. Default to @@ -514,6 +538,9 @@ class Product(proto.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. variants (MutableSequence[google.cloud.retail_v2.types.Product]): Output only. Product variants grouped together on primary product which share similar product attributes. It's @@ -531,8 +558,11 @@ class Product(proto.Message): different places. This is only available for users who have Retail Search - enabled, and it can be managed by [AddLocalInventories][] - and [RemoveLocalInventories][] APIs. + enabled, and it can be managed by + [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + and + [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + APIs. """ class Type(proto.Enum): diff --git a/google/cloud/retail_v2/types/search_service.py b/google/cloud/retail_v2/types/search_service.py index e60b1be1..59942681 100644 --- a/google/cloud/retail_v2/types/search_service.py +++ b/google/cloud/retail_v2/types/search_service.py @@ -43,9 +43,8 @@ class SearchRequest(proto.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 of models that will be used to make the - search. + This field is used to identify the serving config name and + the set of models that will be used to make the search. branch (str): The branch resource name, such as ``projects/*/locations/global/catalogs/default_catalog/branches/0``. @@ -260,7 +259,7 @@ class SearchRequest(proto.Message): To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, - please replace it with other character(s). + 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 @@ -325,7 +324,7 @@ class FacetSpec(proto.Message): Required. The facet key specification. limit (int): Maximum of facet values that should be returned for this - facet. If unspecified, defaults to 20. The maximum allowed + facet. If 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/google/cloud/retail_v2/types/serving_config.py b/google/cloud/retail_v2/types/serving_config.py index 7fc0c300..58cbd685 100644 --- a/google/cloud/retail_v2/types/serving_config.py +++ b/google/cloud/retail_v2/types/serving_config.py @@ -61,13 +61,13 @@ class ServingConfig(proto.Message): 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'. + Default value: ``no-price-reranking``. Can only be set if [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] @@ -191,30 +191,35 @@ class ServingConfig(proto.Message): [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH]. diversity_level (str): How much diversity to use in recommendation model results - e.g. 'medium-diversity' or 'high-diversity'. Currently + e.g. ``medium-diversity`` or ``high-diversity``. Currently supported values: - - 'no-diversity' - - 'low-diversity' - - 'medium-diversity' - - 'high-diversity' - - 'auto-diversity' + - ``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'. + model 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]. + diversity_type (google.cloud.retail_v2.types.ServingConfig.DiversityType): + 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]. enable_category_filter_level (str): Whether to add additional category filters on the - 'similar-items' model. If not specified, we enable it by + ``similar-items`` model. If not specified, we enable it by default. Allowed values are: - - 'no-category-match': No additional filtering of original - results from the model and the customer's filters. - - 'relaxed-category-match': Only keep results with + - ``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 at least one item categories in the PredictRequests's context item. @@ -249,6 +254,12 @@ class ServingConfig(proto.Message): of solution. """ + class DiversityType(proto.Enum): + r"""What type of diversity - data or rule based.""" + DIVERSITY_TYPE_UNSPECIFIED = 0 + RULE_BASED_DIVERSITY = 2 + DATA_DRIVEN_DIVERSITY = 3 + name: str = proto.Field( proto.STRING, number=1, @@ -310,6 +321,11 @@ class ServingConfig(proto.Message): proto.STRING, number=8, ) + diversity_type: DiversityType = proto.Field( + proto.ENUM, + number=20, + enum=DiversityType, + ) enable_category_filter_level: str = proto.Field( proto.STRING, number=16, diff --git a/google/cloud/retail_v2/types/serving_config_service.py b/google/cloud/retail_v2/types/serving_config_service.py index 79726666..08ab94ff 100644 --- a/google/cloud/retail_v2/types/serving_config_service.py +++ b/google/cloud/retail_v2/types/serving_config_service.py @@ -103,7 +103,7 @@ class DeleteServingConfigRequest(proto.Message): name (str): 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}`` """ name: str = proto.Field( @@ -119,7 +119,7 @@ class GetServingConfigRequest(proto.Message): name (str): 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}`` """ name: str = proto.Field( @@ -134,7 +134,7 @@ class ListServingConfigsRequest(proto.Message): Attributes: parent (str): Required. The catalog resource name. Format: - projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + ``projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`` page_size (int): Optional. Maximum number of results to return. If unspecified, defaults to 100. If a @@ -194,7 +194,7 @@ class AddControlRequest(proto.Message): Attributes: serving_config (str): 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}`` control_id (str): Required. The id of the control to apply. Assumed to be in the same catalog as the serving config - if id is not found @@ -217,7 +217,7 @@ class RemoveControlRequest(proto.Message): Attributes: serving_config (str): 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}`` control_id (str): Required. The id of the control to apply. Assumed to be in the same catalog as the serving diff --git a/google/cloud/retail_v2/types/user_event.py b/google/cloud/retail_v2/types/user_event.py index 2053275a..72e371fb 100644 --- a/google/cloud/retail_v2/types/user_event.py +++ b/google/cloud/retail_v2/types/user_event.py @@ -247,7 +247,7 @@ class UserEvent(proto.Message): To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, - please replace it with other character(s). + 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 diff --git a/google/cloud/retail_v2/types/user_event_service.py b/google/cloud/retail_v2/types/user_event_service.py index 9e8cc5d5..87c58f82 100644 --- a/google/cloud/retail_v2/types/user_event_service.py +++ b/google/cloud/retail_v2/types/user_event_service.py @@ -40,6 +40,13 @@ class WriteUserEventRequest(proto.Message): ``projects/1234/locations/global/catalogs/default_catalog``. user_event (google.cloud.retail_v2.types.UserEvent): Required. User event to write. + write_async (bool): + 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. """ parent: str = proto.Field( @@ -51,12 +58,23 @@ class WriteUserEventRequest(proto.Message): number=2, message=gcr_user_event.UserEvent, ) + write_async: bool = proto.Field( + proto.BOOL, + number=3, + ) class CollectUserEventRequest(proto.Message): r"""Request message for CollectUserEvent method. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + prebuilt_rule (str): + The prebuilt rule name that can convert a specific type of + raw_json. For example: "default_schema/v1.0". + + This field is a member of `oneof`_ ``conversion_rule``. parent (str): Required. The parent catalog name, such as ``projects/1234/locations/global/catalogs/default_catalog``. @@ -74,8 +92,18 @@ class CollectUserEventRequest(proto.Message): prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. + raw_json (str): + 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. """ + prebuilt_rule: str = proto.Field( + proto.STRING, + number=6, + oneof="conversion_rule", + ) parent: str = proto.Field( proto.STRING, number=1, @@ -92,6 +120,10 @@ class CollectUserEventRequest(proto.Message): proto.INT64, number=4, ) + raw_json: str = proto.Field( + proto.STRING, + number=5, + ) class RejoinUserEventsRequest(proto.Message): @@ -105,18 +137,18 @@ class RejoinUserEventsRequest(proto.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 + ``USER_EVENT_REJOIN_SCOPE_UNSPECIFIED`` if this field is not set, or set to an invalid integer value. """ class UserEventRejoinScope(proto.Enum): r"""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. If the + events, set ``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``. """ USER_EVENT_REJOIN_SCOPE_UNSPECIFIED = 0 JOINED_EVENTS = 1 @@ -134,7 +166,7 @@ class UserEventRejoinScope(proto.Enum): class RejoinUserEventsResponse(proto.Message): - r"""Response message for RejoinUserEvents method. + r"""Response message for ``RejoinUserEvents`` method. Attributes: rejoined_user_events_count (int): @@ -149,7 +181,7 @@ class RejoinUserEventsResponse(proto.Message): class RejoinUserEventsMetadata(proto.Message): - r"""Metadata for RejoinUserEvents method.""" + r"""Metadata for ``RejoinUserEvents`` method.""" __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_async.py b/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_async.py index 051dfe37..5181d118 100644 --- a/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_async.py +++ b/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_async.py @@ -40,6 +40,7 @@ async def sample_collect_user_event(): # Initialize request argument(s) request = retail_v2.CollectUserEventRequest( + prebuilt_rule="prebuilt_rule_value", parent="parent_value", user_event="user_event_value", ) diff --git a/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_sync.py b/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_sync.py index 0bd7376a..136056fd 100644 --- a/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_sync.py +++ b/samples/generated_samples/retail_v2_generated_user_event_service_collect_user_event_sync.py @@ -40,6 +40,7 @@ def sample_collect_user_event(): # Initialize request argument(s) request = retail_v2.CollectUserEventRequest( + prebuilt_rule="prebuilt_rule_value", parent="parent_value", user_event="user_event_value", ) diff --git a/samples/generated_samples/snippet_metadata_google.cloud.retail.v2.json b/samples/generated_samples/snippet_metadata_google.cloud.retail.v2.json index 1d413027..015f4680 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.retail.v2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.retail.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-retail", - "version": "1.11.0" + "version": "0.1.0" }, "snippets": [ { @@ -6190,12 +6190,12 @@ "regionTag": "retail_v2_generated_UserEventService_CollectUserEvent_async", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -6205,18 +6205,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], @@ -6266,12 +6266,12 @@ "regionTag": "retail_v2_generated_UserEventService_CollectUserEvent_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -6281,18 +6281,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], diff --git a/samples/generated_samples/snippet_metadata_google.cloud.retail.v2alpha.json b/samples/generated_samples/snippet_metadata_google.cloud.retail.v2alpha.json index 9967d5db..a60cdddc 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.retail.v2alpha.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.retail.v2alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-retail", - "version": "1.11.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.retail.v2beta.json b/samples/generated_samples/snippet_metadata_google.cloud.retail.v2beta.json index 104771c2..373ef378 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.retail.v2beta.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.retail.v2beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-retail", - "version": "1.11.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/scripts/fixup_retail_v2_keywords.py b/scripts/fixup_retail_v2_keywords.py index 9e4ba4f4..795ed8be 100644 --- a/scripts/fixup_retail_v2_keywords.py +++ b/scripts/fixup_retail_v2_keywords.py @@ -43,7 +43,7 @@ class retailCallTransformer(cst.CSTTransformer): 'add_control': ('serving_config', 'control_id', ), 'add_fulfillment_places': ('product', 'type_', 'place_ids', 'add_time', 'allow_missing', ), 'add_local_inventories': ('product', 'local_inventories', 'add_mask', 'add_time', 'allow_missing', ), - 'collect_user_event': ('parent', 'user_event', 'uri', 'ets', ), + 'collect_user_event': ('parent', 'user_event', 'prebuilt_rule', 'uri', 'ets', 'raw_json', ), 'complete_query': ('catalog', 'query', 'visitor_id', 'language_codes', 'device_type', 'dataset', 'max_suggestions', ), 'create_control': ('parent', 'control', 'control_id', ), 'create_product': ('parent', 'product', 'product_id', ), @@ -81,7 +81,7 @@ class retailCallTransformer(cst.CSTTransformer): 'update_control': ('control', 'update_mask', ), 'update_product': ('product', 'update_mask', 'allow_missing', ), 'update_serving_config': ('serving_config', 'update_mask', ), - 'write_user_event': ('parent', 'user_event', ), + 'write_user_event': ('parent', 'user_event', 'write_async', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: diff --git a/tests/unit/gapic/retail_v2/test_serving_config_service.py b/tests/unit/gapic/retail_v2/test_serving_config_service.py index b74b871e..dd9c0681 100644 --- a/tests/unit/gapic/retail_v2/test_serving_config_service.py +++ b/tests/unit/gapic/retail_v2/test_serving_config_service.py @@ -744,6 +744,7 @@ def test_create_serving_config(request_type, transport: str = "grpc"): replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -772,6 +773,10 @@ def test_create_serving_config(request_type, transport: str = "grpc"): assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -829,6 +834,7 @@ async def test_create_serving_config_async( replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -858,6 +864,10 @@ async def test_create_serving_config_async( assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -1310,6 +1320,7 @@ def test_update_serving_config(request_type, transport: str = "grpc"): replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -1338,6 +1349,10 @@ def test_update_serving_config(request_type, transport: str = "grpc"): assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -1395,6 +1410,7 @@ async def test_update_serving_config_async( replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -1424,6 +1440,10 @@ async def test_update_serving_config_async( assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -1631,6 +1651,7 @@ def test_get_serving_config(request_type, transport: str = "grpc"): replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -1659,6 +1680,10 @@ def test_get_serving_config(request_type, transport: str = "grpc"): assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -1716,6 +1741,7 @@ async def test_get_serving_config_async( replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -1745,6 +1771,10 @@ async def test_get_serving_config_async( assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -2383,6 +2413,7 @@ def test_add_control(request_type, transport: str = "grpc"): replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -2411,6 +2442,10 @@ def test_add_control(request_type, transport: str = "grpc"): assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -2464,6 +2499,7 @@ async def test_add_control_async( replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -2493,6 +2529,10 @@ async def test_add_control_async( assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -2680,6 +2720,7 @@ def test_remove_control(request_type, transport: str = "grpc"): replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -2708,6 +2749,10 @@ def test_remove_control(request_type, transport: str = "grpc"): assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION] @@ -2761,6 +2806,7 @@ async def test_remove_control_async( replacement_control_ids=["replacement_control_ids_value"], ignore_control_ids=["ignore_control_ids_value"], diversity_level="diversity_level_value", + diversity_type=gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY, enable_category_filter_level="enable_category_filter_level_value", solution_types=[common.SolutionType.SOLUTION_TYPE_RECOMMENDATION], ) @@ -2790,6 +2836,10 @@ async def test_remove_control_async( assert response.replacement_control_ids == ["replacement_control_ids_value"] assert response.ignore_control_ids == ["ignore_control_ids_value"] assert response.diversity_level == "diversity_level_value" + assert ( + response.diversity_type + == gcr_serving_config.ServingConfig.DiversityType.RULE_BASED_DIVERSITY + ) assert response.enable_category_filter_level == "enable_category_filter_level_value" assert response.solution_types == [common.SolutionType.SOLUTION_TYPE_RECOMMENDATION]