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

docs: users can self enroll retail search feature on cloud console #195

Merged
merged 2 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions google/cloud/retail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
from google.cloud.retail_v2.types.common import FulfillmentInfo
from google.cloud.retail_v2.types.common import Image
from google.cloud.retail_v2.types.common import Interval
from google.cloud.retail_v2.types.common import LocalInventory
from google.cloud.retail_v2.types.common import PriceInfo
from google.cloud.retail_v2.types.common import Promotion
Copy link
Contributor

@parthea parthea Mar 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change (It would require users to update their code). Adding do not merge label while I confirm that we want to introduce a breaking change. If so , I need to check with the team on whether we should bump the major version. Another option is to roll back the breaking change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Anthonios! I'm aware that this might be a breaking change. But there is currently only one customer using this field and we will communicate with them with this update.
The major reason behind this is that we're planning to update promotion as a new resource in the future so it's better to update it sooner than later. We may bump the major version if that may help mitigate the risks.

from google.cloud.retail_v2.types.common import Rating
from google.cloud.retail_v2.types.common import UserInfo
from google.cloud.retail_v2.types.completion_service import CompleteQueryRequest
Expand All @@ -87,6 +87,9 @@
from google.cloud.retail_v2.types.product_service import AddFulfillmentPlacesMetadata
from google.cloud.retail_v2.types.product_service import AddFulfillmentPlacesRequest
from google.cloud.retail_v2.types.product_service import AddFulfillmentPlacesResponse
from google.cloud.retail_v2.types.product_service import AddLocalInventoriesMetadata
from google.cloud.retail_v2.types.product_service import AddLocalInventoriesRequest
from google.cloud.retail_v2.types.product_service import AddLocalInventoriesResponse
from google.cloud.retail_v2.types.product_service import CreateProductRequest
from google.cloud.retail_v2.types.product_service import DeleteProductRequest
from google.cloud.retail_v2.types.product_service import GetProductRequest
Expand All @@ -95,10 +98,14 @@
from google.cloud.retail_v2.types.product_service import RemoveFulfillmentPlacesMetadata
from google.cloud.retail_v2.types.product_service import RemoveFulfillmentPlacesRequest
from google.cloud.retail_v2.types.product_service import RemoveFulfillmentPlacesResponse
from google.cloud.retail_v2.types.product_service import RemoveLocalInventoriesMetadata
from google.cloud.retail_v2.types.product_service import RemoveLocalInventoriesRequest
from google.cloud.retail_v2.types.product_service import RemoveLocalInventoriesResponse
from google.cloud.retail_v2.types.product_service import SetInventoryMetadata
from google.cloud.retail_v2.types.product_service import SetInventoryRequest
from google.cloud.retail_v2.types.product_service import SetInventoryResponse
from google.cloud.retail_v2.types.product_service import UpdateProductRequest
from google.cloud.retail_v2.types.promotion import Promotion
from google.cloud.retail_v2.types.purge_config import PurgeMetadata
from google.cloud.retail_v2.types.purge_config import PurgeUserEventsRequest
from google.cloud.retail_v2.types.purge_config import PurgeUserEventsResponse
Expand Down Expand Up @@ -141,8 +148,8 @@
"FulfillmentInfo",
"Image",
"Interval",
"LocalInventory",
"PriceInfo",
"Promotion",
"Rating",
"UserInfo",
"CompleteQueryRequest",
Expand All @@ -169,6 +176,9 @@
"AddFulfillmentPlacesMetadata",
"AddFulfillmentPlacesRequest",
"AddFulfillmentPlacesResponse",
"AddLocalInventoriesMetadata",
"AddLocalInventoriesRequest",
"AddLocalInventoriesResponse",
"CreateProductRequest",
"DeleteProductRequest",
"GetProductRequest",
Expand All @@ -177,10 +187,14 @@
"RemoveFulfillmentPlacesMetadata",
"RemoveFulfillmentPlacesRequest",
"RemoveFulfillmentPlacesResponse",
"RemoveLocalInventoriesMetadata",
"RemoveLocalInventoriesRequest",
"RemoveLocalInventoriesResponse",
"SetInventoryMetadata",
"SetInventoryRequest",
"SetInventoryResponse",
"UpdateProductRequest",
"Promotion",
"PurgeMetadata",
"PurgeUserEventsRequest",
"PurgeUserEventsResponse",
Expand Down
16 changes: 15 additions & 1 deletion google/cloud/retail_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
from .types.common import FulfillmentInfo
from .types.common import Image
from .types.common import Interval
from .types.common import LocalInventory
from .types.common import PriceInfo
from .types.common import Promotion
from .types.common import Rating
from .types.common import UserInfo
from .types.completion_service import CompleteQueryRequest
Expand All @@ -69,6 +69,9 @@
from .types.product_service import AddFulfillmentPlacesMetadata
from .types.product_service import AddFulfillmentPlacesRequest
from .types.product_service import AddFulfillmentPlacesResponse
from .types.product_service import AddLocalInventoriesMetadata
from .types.product_service import AddLocalInventoriesRequest
from .types.product_service import AddLocalInventoriesResponse
from .types.product_service import CreateProductRequest
from .types.product_service import DeleteProductRequest
from .types.product_service import GetProductRequest
Expand All @@ -77,10 +80,14 @@
from .types.product_service import RemoveFulfillmentPlacesMetadata
from .types.product_service import RemoveFulfillmentPlacesRequest
from .types.product_service import RemoveFulfillmentPlacesResponse
from .types.product_service import RemoveLocalInventoriesMetadata
from .types.product_service import RemoveLocalInventoriesRequest
from .types.product_service import RemoveLocalInventoriesResponse
from .types.product_service import SetInventoryMetadata
from .types.product_service import SetInventoryRequest
from .types.product_service import SetInventoryResponse
from .types.product_service import UpdateProductRequest
from .types.promotion import Promotion
from .types.purge_config import PurgeMetadata
from .types.purge_config import PurgeUserEventsRequest
from .types.purge_config import PurgeUserEventsResponse
Expand All @@ -106,6 +113,9 @@
"AddFulfillmentPlacesMetadata",
"AddFulfillmentPlacesRequest",
"AddFulfillmentPlacesResponse",
"AddLocalInventoriesMetadata",
"AddLocalInventoriesRequest",
"AddLocalInventoriesResponse",
"Audience",
"BigQuerySource",
"Catalog",
Expand Down Expand Up @@ -139,6 +149,7 @@
"ListCatalogsResponse",
"ListProductsRequest",
"ListProductsResponse",
"LocalInventory",
"PredictRequest",
"PredictResponse",
"PredictionServiceClient",
Expand All @@ -161,6 +172,9 @@
"RemoveFulfillmentPlacesMetadata",
"RemoveFulfillmentPlacesRequest",
"RemoveFulfillmentPlacesResponse",
"RemoveLocalInventoriesMetadata",
"RemoveLocalInventoriesRequest",
"RemoveLocalInventoriesResponse",
"SearchRequest",
"SearchResponse",
"SearchServiceClient",
Expand Down
20 changes: 20 additions & 0 deletions google/cloud/retail_v2/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@
"add_fulfillment_places"
]
},
"AddLocalInventories": {
"methods": [
"add_local_inventories"
]
},
"CreateProduct": {
"methods": [
"create_product"
Expand Down Expand Up @@ -157,6 +162,11 @@
"remove_fulfillment_places"
]
},
"RemoveLocalInventories": {
"methods": [
"remove_local_inventories"
]
},
"SetInventory": {
"methods": [
"set_inventory"
Expand All @@ -177,6 +187,11 @@
"add_fulfillment_places"
]
},
"AddLocalInventories": {
"methods": [
"add_local_inventories"
]
},
"CreateProduct": {
"methods": [
"create_product"
Expand Down Expand Up @@ -207,6 +222,11 @@
"remove_fulfillment_places"
]
},
"RemoveLocalInventories": {
"methods": [
"remove_local_inventories"
]
},
"SetInventory": {
"methods": [
"set_inventory"
Expand Down
10 changes: 0 additions & 10 deletions google/cloud/retail_v2/services/catalog_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,6 @@ async def set_default_branch(
- UserEventService will only join events with products from
branch {newBranch}.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.


.. code-block:: python

Expand Down Expand Up @@ -565,11 +560,6 @@ async def get_default_branch(
[CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
method under a specified parent catalog.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.


.. code-block:: python

Expand Down
10 changes: 0 additions & 10 deletions google/cloud/retail_v2/services/catalog_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,11 +689,6 @@ def set_default_branch(
- UserEventService will only join events with products from
branch {newBranch}.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.


.. code-block:: python

Expand Down Expand Up @@ -776,11 +771,6 @@ def get_default_branch(
[CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
method under a specified parent catalog.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.


.. code-block:: python

Expand Down
10 changes: 0 additions & 10 deletions google/cloud/retail_v2/services/catalog_service/transports/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,6 @@ def set_default_branch(
- UserEventService will only join events with products from
branch {newBranch}.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.

Returns:
Callable[[~.SetDefaultBranchRequest],
~.Empty]:
Expand Down Expand Up @@ -363,11 +358,6 @@ def get_default_branch(
[CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
method under a specified parent catalog.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.

Returns:
Callable[[~.GetDefaultBranchRequest],
~.GetDefaultBranchResponse]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,6 @@ def set_default_branch(
- UserEventService will only join events with products from
branch {newBranch}.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.

Returns:
Callable[[~.SetDefaultBranchRequest],
Awaitable[~.Empty]]:
Expand Down Expand Up @@ -370,11 +365,6 @@ def get_default_branch(
[CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
method under a specified parent catalog.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.

Returns:
Callable[[~.GetDefaultBranchRequest],
Awaitable[~.GetDefaultBranchResponse]]:
Expand Down
33 changes: 15 additions & 18 deletions google/cloud/retail_v2/services/completion_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@

class CompletionServiceAsyncClient:
"""Auto-completion service for retail.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud sales
if you are interested in using Retail Search.
enabled. Please enable Retail Search on Cloud Console before
using this feature.
"""

_client: CompletionServiceClient
Expand Down Expand Up @@ -218,12 +216,11 @@ async def complete_query(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> completion_service.CompleteQueryResponse:
r"""Completes the specified prefix with keyword suggestions.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
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.


.. code-block:: python
Expand Down Expand Up @@ -291,14 +288,14 @@ async def import_completion_data(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Bulk import of processed completion dataset.

Request processing may be synchronous. Partial updating is not
supported.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
Request processing is asynchronous. Partial updating is
not supported.
The operation is successfully finished only after the
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.


.. code-block:: python
Expand Down
33 changes: 15 additions & 18 deletions google/cloud/retail_v2/services/completion_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ 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 submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud sales
if you are interested in using Retail Search.
enabled. Please enable Retail Search on Cloud Console before
using this feature.
"""

@staticmethod
Expand Down Expand Up @@ -417,12 +415,11 @@ def complete_query(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> completion_service.CompleteQueryResponse:
r"""Completes the specified prefix with keyword suggestions.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
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.


.. code-block:: python
Expand Down Expand Up @@ -491,14 +488,14 @@ def import_completion_data(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Bulk import of processed completion dataset.

Request processing may be synchronous. Partial updating is not
supported.

This feature is only available for users who have Retail Search
enabled. Please submit a form
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
Request processing is asynchronous. Partial updating is
not supported.
The operation is successfully finished only after the
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.


.. code-block:: python
Expand Down
Loading