Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
feat: support async write mode for WriteUserEvent API (#371)
Browse files Browse the repository at this point in the history
* feat: support async write mode for WriteUserEvent API
feat: support collect GA4 event format with prebuilt whistle rule
feat: support exact searchable and retrievable in catalog attribute config
feat: deprecate retrievable_fields in product attribute
feat: support diversity type in serving config
docs: keep the API doc up-to-date with recent changes

PiperOrigin-RevId: 495660792

Source-Link: googleapis/googleapis@0dbe50f

Source-Link: https://github.com/googleapis/googleapis-gen/commit/59b8ced066ba19657e06d78c201e620ca6ab79c2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTliOGNlZDA2NmJhMTk2NTdlMDZkNzhjMjAxZTYyMGNhNmFiNzljMiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Dec 15, 2022
1 parent a62203a commit 1ba8e50
Show file tree
Hide file tree
Showing 39 changed files with 588 additions and 354 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/retail_v2/services/catalog_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/retail_v2/services/completion_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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],
Expand Down
108 changes: 62 additions & 46 deletions google/cloud/retail_v2/services/product_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand All @@ -1012,40 +1012,44 @@ 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]
request.
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],
[ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces],
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 1ba8e50

Please sign in to comment.