From 9d4cb2b91317d3e909aa75a67edd9be3782d7c94 Mon Sep 17 00:00:00 2001 From: kchertenko <108395945+kchertenko@users.noreply.github.com> Date: Fri, 12 Aug 2022 15:24:01 +0300 Subject: [PATCH] chore(samples): add and fix comments (#312) Co-authored-by: Anthonios Partheniou --- .../interactive-tutorials/events/purge_user_event.py | 2 +- .../interactive-tutorials/events/rejoin_user_event.py | 2 +- .../interactive-tutorials/events/write_user_event.py | 2 +- .../interactive-tutorials/product/add_fulfillment_places.py | 2 ++ .../interactive-tutorials/product/crud_product.py | 2 +- .../interactive-tutorials/product/delete_product.py | 2 +- generated_samples/interactive-tutorials/product/get_product.py | 2 +- .../interactive-tutorials/product/import_products_gcs.py | 3 ++- .../interactive-tutorials/product/remove_fulfillment_places.py | 2 ++ .../interactive-tutorials/product/set_inventory.py | 2 ++ .../interactive-tutorials/search/search_with_facet_spec.py | 2 +- 11 files changed, 15 insertions(+), 8 deletions(-) diff --git a/generated_samples/interactive-tutorials/events/purge_user_event.py b/generated_samples/interactive-tutorials/events/purge_user_event.py index cdf8ec53097b..f4c849b3ba85 100644 --- a/generated_samples/interactive-tutorials/events/purge_user_event.py +++ b/generated_samples/interactive-tutorials/events/purge_user_event.py @@ -14,7 +14,7 @@ # [START retail_purge_user_event] -# Import user events into a catalog from inline source using Retail API +# Deleting user event using Retail API. # import google.auth from google.cloud.retail import PurgeUserEventsRequest, UserEventServiceClient diff --git a/generated_samples/interactive-tutorials/events/rejoin_user_event.py b/generated_samples/interactive-tutorials/events/rejoin_user_event.py index 802e755355bb..9269afce2075 100644 --- a/generated_samples/interactive-tutorials/events/rejoin_user_event.py +++ b/generated_samples/interactive-tutorials/events/rejoin_user_event.py @@ -14,7 +14,7 @@ # [START retail_rejoin_user_event] -# Import user events into a catalog from inline source using Retail API +# Starts a user event rejoin operation using Retail API. # import google.auth from google.cloud.retail import RejoinUserEventsRequest, UserEventServiceClient diff --git a/generated_samples/interactive-tutorials/events/write_user_event.py b/generated_samples/interactive-tutorials/events/write_user_event.py index 5221aa7c69e5..25de81686359 100644 --- a/generated_samples/interactive-tutorials/events/write_user_event.py +++ b/generated_samples/interactive-tutorials/events/write_user_event.py @@ -14,7 +14,7 @@ # [START retail_write_user_event] -# Import user events into a catalog from inline source using Retail API +# Write user event using Retail API. # import datetime diff --git a/generated_samples/interactive-tutorials/product/add_fulfillment_places.py b/generated_samples/interactive-tutorials/product/add_fulfillment_places.py index 6f9f843a98f9..c1f5503a2067 100644 --- a/generated_samples/interactive-tutorials/product/add_fulfillment_places.py +++ b/generated_samples/interactive-tutorials/product/add_fulfillment_places.py @@ -13,6 +13,8 @@ # limitations under the License. # [START retail_add_fulfillment_places] +# Adding place IDs using Retail API. +# import datetime import random import string diff --git a/generated_samples/interactive-tutorials/product/crud_product.py b/generated_samples/interactive-tutorials/product/crud_product.py index 432b04b5587d..3e95244cc745 100644 --- a/generated_samples/interactive-tutorials/product/crud_product.py +++ b/generated_samples/interactive-tutorials/product/crud_product.py @@ -14,7 +14,7 @@ # [START retail_crud_product] -# Create product in a catalog using Retail API +# Create, update, get and delete product in a catalog using Retail API. # import random import string diff --git a/generated_samples/interactive-tutorials/product/delete_product.py b/generated_samples/interactive-tutorials/product/delete_product.py index c3ca3b2865d8..5c3e01a22d2b 100644 --- a/generated_samples/interactive-tutorials/product/delete_product.py +++ b/generated_samples/interactive-tutorials/product/delete_product.py @@ -14,7 +14,7 @@ # [START retail_delete_product] -# Delete product from a catalog using Retail API +# Delete product from a catalog using Retail API. # import random import string diff --git a/generated_samples/interactive-tutorials/product/get_product.py b/generated_samples/interactive-tutorials/product/get_product.py index 3ff1d0f8b4e5..f591bf1297da 100644 --- a/generated_samples/interactive-tutorials/product/get_product.py +++ b/generated_samples/interactive-tutorials/product/get_product.py @@ -14,7 +14,7 @@ # [START retail_get_product] -# Get product from a catalog using Retail API +# Get product from a catalog using Retail API. # import random import string diff --git a/generated_samples/interactive-tutorials/product/import_products_gcs.py b/generated_samples/interactive-tutorials/product/import_products_gcs.py index 90f586accc47..ae49f1d58ceb 100644 --- a/generated_samples/interactive-tutorials/product/import_products_gcs.py +++ b/generated_samples/interactive-tutorials/product/import_products_gcs.py @@ -18,7 +18,8 @@ def main(bucket_name): # [START retail_import_products_from_gcs] - + # Import products from using Retail API. + # import time import google.auth diff --git a/generated_samples/interactive-tutorials/product/remove_fulfillment_places.py b/generated_samples/interactive-tutorials/product/remove_fulfillment_places.py index a6d7ef5ae37e..400ab80ffae0 100644 --- a/generated_samples/interactive-tutorials/product/remove_fulfillment_places.py +++ b/generated_samples/interactive-tutorials/product/remove_fulfillment_places.py @@ -13,6 +13,8 @@ # limitations under the License. # [START retail_remove_fulfillment_places] +# Remove place IDs using Retail API. +# import datetime import random import string diff --git a/generated_samples/interactive-tutorials/product/set_inventory.py b/generated_samples/interactive-tutorials/product/set_inventory.py index b0060ffb9f64..4a779c3f6a52 100644 --- a/generated_samples/interactive-tutorials/product/set_inventory.py +++ b/generated_samples/interactive-tutorials/product/set_inventory.py @@ -13,6 +13,8 @@ # limitations under the License. # [START retail_set_inventory] +# Updating inventory information using Retail API. +# import datetime import random import string diff --git a/generated_samples/interactive-tutorials/search/search_with_facet_spec.py b/generated_samples/interactive-tutorials/search/search_with_facet_spec.py index e4f112e106b3..f3df9448ad5f 100644 --- a/generated_samples/interactive-tutorials/search/search_with_facet_spec.py +++ b/generated_samples/interactive-tutorials/search/search_with_facet_spec.py @@ -13,8 +13,8 @@ # limitations under the License. # [START retail_search_product_with_facet_spec] +# Call Retail API to search for a products in a catalog with facets. # - import google.auth from google.cloud.retail import SearchRequest, SearchServiceClient