From b04ce470125ebd2a95fe02c246c24a350c38c70b Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Wed, 10 Nov 2021 21:44:21 +0000
Subject: [PATCH] docs(samples): add example tags to generated samples (#116)
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 408439482
Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9
Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9
---
.../linkinator.config.json | 2 +-
.../v2/catalog_service.get_default_branch.js | 4 +-
.../v2/catalog_service.list_catalogs.js | 14 +-
.../v2/catalog_service.set_default_branch.js | 6 +-
.../v2/catalog_service.update_catalog.js | 16 +-
.../v2/completion_service.complete_query.js | 10 +-
...mpletion_service.import_completion_data.js | 8 +-
.../v2/prediction_service.predict.js | 14 +-
.../product_service.add_fulfillment_places.js | 24 +-
.../v2/product_service.create_product.js | 18 +-
.../v2/product_service.delete_product.js | 24 +-
.../v2/product_service.get_product.js | 10 +-
.../v2/product_service.import_products.js | 22 +-
.../v2/product_service.list_products.js | 60 +-
...oduct_service.remove_fulfillment_places.js | 22 +-
.../v2/product_service.set_inventory.js | 52 +-
.../v2/product_service.update_product.js | 20 +-
.../generated/v2/search_service.search.js | 106 +--
.../user_event_service.collect_user_event.js | 4 +-
.../user_event_service.import_user_events.js | 8 +-
.../user_event_service.purge_user_events.js | 6 +-
.../user_event_service.rejoin_user_events.js | 6 +-
.../v2/user_event_service.write_user_event.js | 6 +-
.../catalog_service.get_default_branch.js | 4 +-
.../v2alpha/catalog_service.list_catalogs.js | 14 +-
.../catalog_service.set_default_branch.js | 6 +-
.../v2alpha/catalog_service.update_catalog.js | 16 +-
.../completion_service.complete_query.js | 10 +-
...mpletion_service.import_completion_data.js | 8 +-
.../v2alpha/prediction_service.predict.js | 14 +-
.../product_service.add_fulfillment_places.js | 24 +-
.../product_service.add_local_inventories.js | 20 +-
.../v2alpha/product_service.create_product.js | 18 +-
.../v2alpha/product_service.delete_product.js | 24 +-
.../v2alpha/product_service.get_product.js | 10 +-
.../product_service.import_products.js | 22 +-
.../v2alpha/product_service.list_products.js | 64 +-
...oduct_service.remove_fulfillment_places.js | 22 +-
...roduct_service.remove_local_inventories.js | 16 +-
.../v2alpha/product_service.set_inventory.js | 52 +-
.../v2alpha/product_service.update_product.js | 20 +-
.../v2alpha/search_service.search.js | 114 +--
.../user_event_service.collect_user_event.js | 4 +-
.../user_event_service.import_user_events.js | 8 +-
.../user_event_service.purge_user_events.js | 6 +-
.../user_event_service.rejoin_user_events.js | 6 +-
.../user_event_service.write_user_event.js | 6 +-
.../catalog_service.get_default_branch.js | 4 +-
.../v2beta/catalog_service.list_catalogs.js | 14 +-
.../catalog_service.set_default_branch.js | 6 +-
.../v2beta/catalog_service.update_catalog.js | 16 +-
.../completion_service.complete_query.js | 10 +-
...mpletion_service.import_completion_data.js | 8 +-
.../v2beta/prediction_service.predict.js | 14 +-
.../product_service.add_fulfillment_places.js | 24 +-
.../v2beta/product_service.create_product.js | 18 +-
.../v2beta/product_service.delete_product.js | 24 +-
.../v2beta/product_service.get_product.js | 10 +-
.../v2beta/product_service.import_products.js | 22 +-
.../v2beta/product_service.list_products.js | 60 +-
...oduct_service.remove_fulfillment_places.js | 22 +-
.../v2beta/product_service.set_inventory.js | 52 +-
.../v2beta/product_service.update_product.js | 20 +-
.../generated/v2beta/search_service.search.js | 106 +--
.../user_event_service.collect_user_event.js | 4 +-
.../user_event_service.import_user_events.js | 8 +-
.../user_event_service.purge_user_events.js | 6 +-
.../user_event_service.rejoin_user_events.js | 6 +-
.../user_event_service.write_user_event.js | 6 +-
.../src/v2/catalog_service_client.ts | 226 +++--
.../src/v2/completion_service_client.ts | 136 ++-
.../src/v2/prediction_service_client.ts | 58 +-
.../src/v2/product_service_client.ts | 664 +++++++-------
.../src/v2/search_service_client.ts | 62 +-
.../src/v2/user_event_service_client.ts | 320 ++++---
.../src/v2alpha/catalog_service_client.ts | 244 +++--
.../src/v2alpha/completion_service_client.ts | 144 ++-
.../src/v2alpha/prediction_service_client.ts | 58 +-
.../src/v2alpha/product_service_client.ts | 850 +++++++++---------
.../src/v2alpha/search_service_client.ts | 62 +-
.../src/v2alpha/user_event_service_client.ts | 328 ++++---
.../src/v2beta/catalog_service_client.ts | 244 +++--
.../src/v2beta/completion_service_client.ts | 144 ++-
.../src/v2beta/prediction_service_client.ts | 58 +-
.../src/v2beta/product_service_client.ts | 682 +++++++-------
.../src/v2beta/search_service_client.ts | 62 +-
.../src/v2beta/user_event_service_client.ts | 328 ++++---
87 files changed, 2980 insertions(+), 3120 deletions(-)
diff --git a/packages/google-cloud-retail/linkinator.config.json b/packages/google-cloud-retail/linkinator.config.json
index 29a223b6db6..0121dfa684f 100644
--- a/packages/google-cloud-retail/linkinator.config.json
+++ b/packages/google-cloud-retail/linkinator.config.json
@@ -6,5 +6,5 @@
"img.shields.io"
],
"silent": true,
- "concurrency": 10
+ "concurrency": 5
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js b/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js
index 9fe97d816a5..616febdd7fe 100644
--- a/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js
+++ b/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js
@@ -31,7 +31,7 @@ function main() {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function getDefaultBranch() {
+ async function callGetDefaultBranch() {
// Construct request
const request = {};
@@ -40,7 +40,7 @@ function main() {
console.log(response);
}
- getDefaultBranch();
+ callGetDefaultBranch();
// [END retail_v2_generated_CatalogService_GetDefaultBranch_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js b/packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js
index 202bd7181f5..27dbac42322 100644
--- a/packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js
+++ b/packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js
@@ -22,13 +22,13 @@ function main(parent) {
/**
* Required. The account resource name with an associated location.
* If the caller does not have permission to list
- * [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless
+ * Catalog google.cloud.retail.v2.Catalog s under this location, regardless
* of whether or not this location exists, a PERMISSION_DENIED error is
* returned.
*/
// const parent = 'abc123'
/**
- * Maximum number of [Catalog][google.cloud.retail.v2.Catalog]s to return. If
+ * Maximum number of Catalog google.cloud.retail.v2.Catalog s to return. If
* unspecified, defaults to 50. The maximum allowed value is 1000. Values
* above 1000 will be coerced to 1000.
* If this field is negative, an INVALID_ARGUMENT is returned.
@@ -36,12 +36,12 @@ function main(parent) {
// const pageSize = 1234
/**
* A page token
- * [ListCatalogsResponse.next_page_token][google.cloud.retail.v2.ListCatalogsResponse.next_page_token],
+ * ListCatalogsResponse.next_page_token google.cloud.retail.v2.ListCatalogsResponse.next_page_token,
* received from a previous
- * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
+ * CatalogService.ListCatalogs google.cloud.retail.v2.CatalogService.ListCatalogs
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
+ * CatalogService.ListCatalogs google.cloud.retail.v2.CatalogService.ListCatalogs
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
@@ -53,7 +53,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function listCatalogs() {
+ async function callListCatalogs() {
// Construct request
const request = {
parent,
@@ -66,7 +66,7 @@ function main(parent) {
}
}
- listCatalogs();
+ callListCatalogs();
// [END retail_v2_generated_CatalogService_ListCatalogs_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js b/packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js
index 0fb5d32dfae..9e25ac849cc 100644
--- a/packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js
+++ b/packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js
@@ -32,7 +32,7 @@ function main() {
// const branchId = 'abc123'
/**
* Some note on this request, this can be retrieved by
- * [CatalogService.GetDefaultBranch][google.cloud.retail.v2.CatalogService.GetDefaultBranch]
+ * CatalogService.GetDefaultBranch google.cloud.retail.v2.CatalogService.GetDefaultBranch
* before next valid default branch set occurs.
* This field must be a UTF-8 encoded string with a length limit of 1,000
* characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -45,7 +45,7 @@ function main() {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function setDefaultBranch() {
+ async function callSetDefaultBranch() {
// Construct request
const request = {};
@@ -54,7 +54,7 @@ function main() {
console.log(response);
}
- setDefaultBranch();
+ callSetDefaultBranch();
// [END retail_v2_generated_CatalogService_SetDefaultBranch_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js b/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js
index 8854bfff33f..dc4acf4c26d 100644
--- a/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js
+++ b/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js
@@ -20,21 +20,21 @@ function main(catalog) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
- * Required. The [Catalog][google.cloud.retail.v2.Catalog] to update.
+ * Required. The Catalog google.cloud.retail.v2.Catalog to update.
* If the caller does not have permission to update the
- * [Catalog][google.cloud.retail.v2.Catalog], regardless of whether or not it
+ * Catalog google.cloud.retail.v2.Catalog, regardless of whether or not it
* exists, a PERMISSION_DENIED error is returned.
- * If the [Catalog][google.cloud.retail.v2.Catalog] to update does not exist,
+ * If the Catalog google.cloud.retail.v2.Catalog to update does not exist,
* a NOT_FOUND error is returned.
*/
- // const catalog = ''
+ // const catalog = {}
/**
* Indicates which fields in the provided
- * [Catalog][google.cloud.retail.v2.Catalog] to update.
+ * Catalog google.cloud.retail.v2.Catalog to update.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const updateMask = ''
+ // const updateMask = {}
// Imports the Retail library
const {CatalogServiceClient} = require('@google-cloud/retail').v2;
@@ -42,7 +42,7 @@ function main(catalog) {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function updateCatalog() {
+ async function callUpdateCatalog() {
// Construct request
const request = {
catalog,
@@ -53,7 +53,7 @@ function main(catalog) {
console.log(response);
}
- updateCatalog();
+ callUpdateCatalog();
// [END retail_v2_generated_CatalogService_UpdateCatalog_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js b/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js
index e57f2d0374c..af3d936e570 100644
--- a/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js
+++ b/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js
@@ -43,7 +43,7 @@ function main(catalog, query) {
* The list of languages of the query. This is
* the BCP-47 language code, such as "en-US" or "sr-Latn".
* For more information, see
- * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+ * Tags for Identifying Languages (https://tools.ietf.org/html/bcp47).
* The maximum number of allowed characters is 255.
* Only "en-US" is currently supported.
*/
@@ -63,7 +63,7 @@ function main(catalog, query) {
/**
* Determines which dataset to use for fetching completion. "user-data" will
* use the imported dataset through
- * [CompletionService.ImportCompletionData][google.cloud.retail.v2.CompletionService.ImportCompletionData].
+ * CompletionService.ImportCompletionData google.cloud.retail.v2.CompletionService.ImportCompletionData.
* "cloud-retail" will use the dataset generated by cloud retail based on user
* events. If leave empty, it will use the "user-data".
* Current supported values:
@@ -75,7 +75,7 @@ function main(catalog, query) {
// const dataset = 'abc123'
/**
* Completion max suggestions. If left unset or set to 0, then will fallback
- * to the configured value [CompletionConfig.max_suggestions][].
+ * to the configured value CompletionConfig.max_suggestions .
* The maximum allowed max suggestions is 20. If it is set higher, it will be
* capped by 20.
*/
@@ -87,7 +87,7 @@ function main(catalog, query) {
// Instantiates a client
const retailClient = new CompletionServiceClient();
- async function completeQuery() {
+ async function callCompleteQuery() {
// Construct request
const request = {
catalog,
@@ -99,7 +99,7 @@ function main(catalog, query) {
console.log(response);
}
- completeQuery();
+ callCompleteQuery();
// [END retail_v2_generated_CompletionService_CompleteQuery_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js b/packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js
index b11a522e5d6..7fbbeac3271 100644
--- a/packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js
+++ b/packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js
@@ -27,12 +27,12 @@ function main(parent, inputConfig) {
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* Pub/Sub topic for receiving notification. If this field is set,
* when the import is finished, a notification will be sent to
* specified Pub/Sub topic. The message data will be JSON string of a
- * [Operation][google.longrunning.Operation].
+ * Operation google.longrunning.Operation.
* Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
*/
// const notificationPubsubTopic = 'abc123'
@@ -43,7 +43,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new CompletionServiceClient();
- async function importCompletionData() {
+ async function callImportCompletionData() {
// Construct request
const request = {
parent,
@@ -56,7 +56,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importCompletionData();
+ callImportCompletionData();
// [END retail_v2_generated_CompletionService_ImportCompletionData_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js b/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js
index 958bf3d648d..e6d65ce9168 100644
--- a/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js
+++ b/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js
@@ -24,8 +24,8 @@ function main(placement, userEvent) {
* {name=projects/* /locations/global/catalogs/default_catalog/placements/*}
* The ID of the Recommendations AI placement. Before you can request
* predictions from your model, you must create at least one placement for it.
- * For more information, see [Managing
- * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
+ * For more information, see Managing
+ * placements (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
* The full list of available placements can be seen at
* https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
*/
@@ -36,7 +36,7 @@ function main(placement, userEvent) {
* won't be ingested to userEvent logs. Thus, a separate userEvent write
* request is required for event logging.
*/
- // const userEvent = ''
+ // const userEvent = {}
/**
* Maximum number of results to return per page. Set this property
* to the number of prediction results needed. If zero, the service will
@@ -117,8 +117,8 @@ function main(placement, userEvent) {
* * The key portion of a label must be unique. However, you can use the same
* key with multiple resources.
* * Keys must start with a lowercase letter or international character.
- * See [Google Cloud
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+ * See Google Cloud
+ * Document (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
* for more details.
*/
// const labels = 1234
@@ -129,7 +129,7 @@ function main(placement, userEvent) {
// Instantiates a client
const retailClient = new PredictionServiceClient();
- async function predict() {
+ async function callPredict() {
// Construct request
const request = {
placement,
@@ -141,7 +141,7 @@ function main(placement, userEvent) {
console.log(response);
}
- predict();
+ callPredict();
// [END retail_v2_generated_PredictionService_Predict_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js b/packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js
index 099df303b45..980b9b800bc 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js
@@ -20,11 +20,11 @@ function main(product, type, placeIds) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
- * Required. Full resource name of [Product][google.cloud.retail.v2.Product],
+ * Required. Full resource name of Product google.cloud.retail.v2.Product,
* such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2.Product], regardless of whether or not it
+ * Product google.cloud.retail.v2.Product, regardless of whether or not it
* exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -43,22 +43,22 @@ function main(product, type, placeIds) {
* * "custom-type-5"
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
- * This field directly corresponds to [Product.fulfillment_info.type][].
+ * This field directly corresponds to Product.fulfillment_info.type .
*/
// const type = 'abc123'
/**
* Required. The IDs for this
- * [type][google.cloud.retail.v2.AddFulfillmentPlacesRequest.type], such as
+ * type google.cloud.retail.v2.AddFulfillmentPlacesRequest.type, such as
* the store IDs for "pickup-in-store" or the region IDs for
* "same-day-delivery" to be added for this
- * [type][google.cloud.retail.v2.AddFulfillmentPlacesRequest.type]. Duplicate
+ * type google.cloud.retail.v2.AddFulfillmentPlacesRequest.type. Duplicate
* IDs will be automatically ignored.
* At least 1 value is required, and a maximum of 2000 values are allowed.
* Each value must be a string with a length limit of 10 characters, matching
* the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
* INVALID_ARGUMENT error is returned.
* If the total number of place IDs exceeds 2000 for this
- * [type][google.cloud.retail.v2.AddFulfillmentPlacesRequest.type] after
+ * type google.cloud.retail.v2.AddFulfillmentPlacesRequest.type after
* adding, then the update will be rejected.
*/
// const placeIds = 'abc123'
@@ -67,14 +67,14 @@ function main(product, type, placeIds) {
* out-of-order updates on fulfillment information. If not provided, the
* internal system time will be used.
*/
- // const addTime = ''
+ // const addTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2.Product] is not
+ * If set to true, and the Product google.cloud.retail.v2.Product is not
* found, the fulfillment information will still be processed and retained for
* at most 1 day and processed once the
- * [Product][google.cloud.retail.v2.Product] is created. If set to false, a
+ * Product google.cloud.retail.v2.Product is created. If set to false, a
* NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2.Product] is not found.
+ * Product google.cloud.retail.v2.Product is not found.
*/
// const allowMissing = true
@@ -84,7 +84,7 @@ function main(product, type, placeIds) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function addFulfillmentPlaces() {
+ async function callAddFulfillmentPlaces() {
// Construct request
const request = {
product,
@@ -98,7 +98,7 @@ function main(product, type, placeIds) {
console.log(response);
}
- addFulfillmentPlaces();
+ callAddFulfillmentPlaces();
// [END retail_v2_generated_ProductService_AddFulfillmentPlaces_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js b/packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js
index 028c99d005a..f2cc6a459ba 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js
@@ -25,19 +25,19 @@ function main(parent, product, productId) {
*/
// const parent = 'abc123'
/**
- * Required. The [Product][google.cloud.retail.v2.Product] to create.
+ * Required. The Product google.cloud.retail.v2.Product to create.
*/
- // const product = ''
+ // const product = {}
/**
- * Required. The ID to use for the [Product][google.cloud.retail.v2.Product],
+ * Required. The ID to use for the Product google.cloud.retail.v2.Product,
* which will become the final component of the
- * [Product.name][google.cloud.retail.v2.Product.name].
+ * Product.name google.cloud.retail.v2.Product.name.
* If the caller does not have permission to create the
- * [Product][google.cloud.retail.v2.Product], regardless of whether or not it
+ * Product google.cloud.retail.v2.Product, regardless of whether or not it
* exists, a PERMISSION_DENIED error is returned.
* This field must be unique among all
- * [Product][google.cloud.retail.v2.Product]s with the same
- * [parent][google.cloud.retail.v2.CreateProductRequest.parent]. Otherwise, an
+ * Product google.cloud.retail.v2.Product s with the same
+ * parent google.cloud.retail.v2.CreateProductRequest.parent. Otherwise, an
* ALREADY_EXISTS error is returned.
* This field must be a UTF-8 encoded string with a length limit of 128
* characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -50,7 +50,7 @@ function main(parent, product, productId) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function createProduct() {
+ async function callCreateProduct() {
// Construct request
const request = {
parent,
@@ -63,7 +63,7 @@ function main(parent, product, productId) {
console.log(response);
}
- createProduct();
+ callCreateProduct();
// [END retail_v2_generated_ProductService_CreateProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js b/packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js
index d685ce6beec..966f6c6a2d3 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js
@@ -20,23 +20,23 @@ function main(name) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
- * Required. Full resource name of [Product][google.cloud.retail.v2.Product],
+ * Required. Full resource name of Product google.cloud.retail.v2.Product,
* such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to delete the
- * [Product][google.cloud.retail.v2.Product], regardless of whether or not it
+ * Product google.cloud.retail.v2.Product, regardless of whether or not it
* exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2.Product] to delete does not exist,
+ * If the Product google.cloud.retail.v2.Product to delete does not exist,
* a NOT_FOUND error is returned.
- * The [Product][google.cloud.retail.v2.Product] to delete can neither be a
- * [Product.Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2.Product] member nor a
- * [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2.Product] with more than one
- * [variants][google.cloud.retail.v2.Product.Type.VARIANT]. Otherwise, an
+ * The Product google.cloud.retail.v2.Product to delete can neither be a
+ * Product.Type.COLLECTION google.cloud.retail.v2.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2.Product member nor a
+ * Product.Type.PRIMARY google.cloud.retail.v2.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2.Product with more than one
+ * variants google.cloud.retail.v2.Product.Type.VARIANT. Otherwise, an
* INVALID_ARGUMENT error is returned.
* All inventory information for the named
- * [Product][google.cloud.retail.v2.Product] will be deleted.
+ * Product google.cloud.retail.v2.Product will be deleted.
*/
// const name = 'abc123'
@@ -46,7 +46,7 @@ function main(name) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function deleteProduct() {
+ async function callDeleteProduct() {
// Construct request
const request = {
name,
@@ -57,7 +57,7 @@ function main(name) {
console.log(response);
}
- deleteProduct();
+ callDeleteProduct();
// [END retail_v2_generated_ProductService_DeleteProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js b/packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js
index 11234b7d507..307769685ff 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js
@@ -20,13 +20,13 @@ function main(name) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
- * Required. Full resource name of [Product][google.cloud.retail.v2.Product],
+ * Required. Full resource name of Product google.cloud.retail.v2.Product,
* such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2.Product], regardless of whether or not it
+ * Product google.cloud.retail.v2.Product, regardless of whether or not it
* exists, a PERMISSION_DENIED error is returned.
- * If the requested [Product][google.cloud.retail.v2.Product] does not exist,
+ * If the requested Product google.cloud.retail.v2.Product does not exist,
* a NOT_FOUND error is returned.
*/
// const name = 'abc123'
@@ -37,7 +37,7 @@ function main(name) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function getProduct() {
+ async function callGetProduct() {
// Construct request
const request = {
name,
@@ -48,7 +48,7 @@ function main(name) {
console.log(response);
}
- getProduct();
+ callGetProduct();
// [END retail_v2_generated_ProductService_GetProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js b/packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js
index e950f862cac..b7ad9f6c6ef 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js
@@ -31,39 +31,39 @@ function main(parent, inputConfig) {
* dataset scope. Ensures idempotency and used for request deduplication.
* Server-generated if unspecified. Up to 128 characters long and must match
* the pattern: `[a-zA-Z0-9_]+`. This is returned as [Operation.name][] in
- * [ImportMetadata][google.cloud.retail.v2.ImportMetadata].
+ * ImportMetadata google.cloud.retail.v2.ImportMetadata.
* Only supported when
- * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode]
+ * ImportProductsRequest.reconciliation_mode google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode
* is set to `FULL`.
*/
// const requestId = 'abc123'
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* The desired location of errors incurred during the Import.
*/
- // const errorsConfig = ''
+ // const errorsConfig = {}
/**
* Indicates which fields in the provided imported 'products' to update. If
* not set, will by default update all fields.
*/
- // const updateMask = ''
+ // const updateMask = {}
/**
* The mode of reconciliation between existing products and the products to be
* imported. Defaults to
- * [ReconciliationMode.INCREMENTAL][google.cloud.retail.v2.ImportProductsRequest.ReconciliationMode.INCREMENTAL].
+ * ReconciliationMode.INCREMENTAL google.cloud.retail.v2.ImportProductsRequest.ReconciliationMode.INCREMENTAL.
*/
- // const reconciliationMode = ''
+ // const reconciliationMode = {}
/**
* Pub/Sub topic for receiving notification. If this field is set,
* when the import is finished, a notification will be sent to
* specified Pub/Sub topic. The message data will be JSON string of a
- * [Operation][google.longrunning.Operation].
+ * Operation google.longrunning.Operation.
* Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
* Only supported when
- * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode]
+ * ImportProductsRequest.reconciliation_mode google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode
* is set to `FULL`.
*/
// const notificationPubsubTopic = 'abc123'
@@ -74,7 +74,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function importProducts() {
+ async function callImportProducts() {
// Construct request
const request = {
parent,
@@ -87,7 +87,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importProducts();
+ callImportProducts();
// [END retail_v2_generated_ProductService_ImportProducts_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js b/packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js
index f232a2ad292..883653e1921 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js
@@ -25,12 +25,12 @@ function main(parent) {
* `default_branch` as the branch ID, to list products under the default
* branch.
* If the caller does not have permission to list
- * [Product][google.cloud.retail.v2.Product]s under this branch, regardless of
+ * Product google.cloud.retail.v2.Product s under this branch, regardless of
* whether or not this branch exists, a PERMISSION_DENIED error is returned.
*/
// const parent = 'abc123'
/**
- * Maximum number of [Product][google.cloud.retail.v2.Product]s to return. If
+ * Maximum number of Product google.cloud.retail.v2.Product s to return. If
* unspecified, defaults to 100. The maximum allowed value is 1000. Values
* above 1000 will be coerced to 1000.
* If this field is negative, an INVALID_ARGUMENT error is returned.
@@ -38,12 +38,12 @@ function main(parent) {
// const pageSize = 1234
/**
* A page token
- * [ListProductsResponse.next_page_token][google.cloud.retail.v2.ListProductsResponse.next_page_token],
+ * ListProductsResponse.next_page_token google.cloud.retail.v2.ListProductsResponse.next_page_token,
* received from a previous
- * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]
+ * ProductService.ListProducts google.cloud.retail.v2.ProductService.ListProducts
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]
+ * ProductService.ListProducts google.cloud.retail.v2.ProductService.ListProducts
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
@@ -51,48 +51,48 @@ function main(parent) {
/**
* A filter to apply on the list results. Supported features:
* * List all the products under the parent branch if
- * [filter][google.cloud.retail.v2.ListProductsRequest.filter] is unset.
- * * List [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2.Product]s sharing the same
- * [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2.Product]. For example:
+ * filter google.cloud.retail.v2.ListProductsRequest.filter is unset.
+ * * List Product.Type.VARIANT google.cloud.retail.v2.Product.Type.VARIANT
+ * Product google.cloud.retail.v2.Product s sharing the same
+ * Product.Type.PRIMARY google.cloud.retail.v2.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2.Product. For example:
* `primary_product_id = "some_product_id"`
- * * List [Product][google.cloud.retail.v2.Product]s bundled in a
- * [Product.Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2.Product].
+ * * List Product google.cloud.retail.v2.Product s bundled in a
+ * Product.Type.COLLECTION google.cloud.retail.v2.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2.Product.
* For example:
* `collection_product_id = "some_product_id"`
- * * List [Product][google.cloud.retail.v2.Product]s with a partibular type.
+ * * List Product google.cloud.retail.v2.Product s with a partibular type.
* For example:
* `type = "PRIMARY"`
* `type = "VARIANT"`
* `type = "COLLECTION"`
* If the field is unrecognizable, an INVALID_ARGUMENT error is returned.
* If the specified
- * [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2.Product] or
- * [Product.Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2.Product] does not exist, a NOT_FOUND error
+ * Product.Type.PRIMARY google.cloud.retail.v2.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2.Product or
+ * Product.Type.COLLECTION google.cloud.retail.v2.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2.Product does not exist, a NOT_FOUND error
* is returned.
*/
// const filter = 'abc123'
/**
- * The fields of [Product][google.cloud.retail.v2.Product] to return in the
+ * The fields of Product google.cloud.retail.v2.Product to return in the
* responses. If not set or empty, the following fields are returned:
- * * [Product.name][google.cloud.retail.v2.Product.name]
- * * [Product.id][google.cloud.retail.v2.Product.id]
- * * [Product.title][google.cloud.retail.v2.Product.title]
- * * [Product.uri][google.cloud.retail.v2.Product.uri]
- * * [Product.images][google.cloud.retail.v2.Product.images]
- * * [Product.price_info][google.cloud.retail.v2.Product.price_info]
- * * [Product.brands][google.cloud.retail.v2.Product.brands]
+ * * Product.name google.cloud.retail.v2.Product.name
+ * * Product.id google.cloud.retail.v2.Product.id
+ * * Product.title google.cloud.retail.v2.Product.title
+ * * Product.uri google.cloud.retail.v2.Product.uri
+ * * Product.images google.cloud.retail.v2.Product.images
+ * * Product.price_info google.cloud.retail.v2.Product.price_info
+ * * Product.brands google.cloud.retail.v2.Product.brands
* If "*" is provided, all fields are returned.
- * [Product.name][google.cloud.retail.v2.Product.name] is always returned no
+ * Product.name google.cloud.retail.v2.Product.name is always returned no
* matter what mask is set.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const readMask = ''
+ // const readMask = {}
// Imports the Retail library
const {ProductServiceClient} = require('@google-cloud/retail').v2;
@@ -100,7 +100,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function listProducts() {
+ async function callListProducts() {
// Construct request
const request = {
parent,
@@ -113,7 +113,7 @@ function main(parent) {
}
}
- listProducts();
+ callListProducts();
// [END retail_v2_generated_ProductService_ListProducts_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js b/packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js
index 22db6417908..7c6456a7d1e 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js
@@ -20,11 +20,11 @@ function main(product, type, placeIds) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
- * Required. Full resource name of [Product][google.cloud.retail.v2.Product],
+ * Required. Full resource name of Product google.cloud.retail.v2.Product,
* such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2.Product], regardless of whether or not it
+ * Product google.cloud.retail.v2.Product, regardless of whether or not it
* exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -43,15 +43,15 @@ function main(product, type, placeIds) {
* * "custom-type-5"
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
- * This field directly corresponds to [Product.fulfillment_info.type][].
+ * This field directly corresponds to Product.fulfillment_info.type .
*/
// const type = 'abc123'
/**
* Required. The IDs for this
- * [type][google.cloud.retail.v2.RemoveFulfillmentPlacesRequest.type], such as
+ * type google.cloud.retail.v2.RemoveFulfillmentPlacesRequest.type, such as
* the store IDs for "pickup-in-store" or the region IDs for
* "same-day-delivery", to be removed for this
- * [type][google.cloud.retail.v2.RemoveFulfillmentPlacesRequest.type].
+ * type google.cloud.retail.v2.RemoveFulfillmentPlacesRequest.type.
* At least 1 value is required, and a maximum of 2000 values are allowed.
* Each value must be a string with a length limit of 10 characters, matching
* the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
@@ -63,14 +63,14 @@ function main(product, type, placeIds) {
* out-of-order updates on fulfillment information. If not provided, the
* internal system time will be used.
*/
- // const removeTime = ''
+ // const removeTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2.Product] is not
+ * If set to true, and the Product google.cloud.retail.v2.Product is not
* found, the fulfillment information will still be processed and retained for
* at most 1 day and processed once the
- * [Product][google.cloud.retail.v2.Product] is created. If set to false, a
+ * Product google.cloud.retail.v2.Product is created. If set to false, a
* NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2.Product] is not found.
+ * Product google.cloud.retail.v2.Product is not found.
*/
// const allowMissing = true
@@ -80,7 +80,7 @@ function main(product, type, placeIds) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function removeFulfillmentPlaces() {
+ async function callRemoveFulfillmentPlaces() {
// Construct request
const request = {
product,
@@ -94,7 +94,7 @@ function main(product, type, placeIds) {
console.log(response);
}
- removeFulfillmentPlaces();
+ callRemoveFulfillmentPlaces();
// [END retail_v2_generated_ProductService_RemoveFulfillmentPlaces_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js b/packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js
index a95bd8a5037..195aac173e5 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js
@@ -22,56 +22,56 @@ function main(inventory) {
/**
* Required. The inventory information to update. The allowable fields to
* update are:
- * * [Product.price_info][google.cloud.retail.v2.Product.price_info]
- * * [Product.availability][google.cloud.retail.v2.Product.availability]
- * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity]
- * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info]
+ * * Product.price_info google.cloud.retail.v2.Product.price_info
+ * * Product.availability google.cloud.retail.v2.Product.availability
+ * * Product.available_quantity google.cloud.retail.v2.Product.available_quantity
+ * * Product.fulfillment_info google.cloud.retail.v2.Product.fulfillment_info
* The updated inventory fields must be specified in
- * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask].
- * If [SetInventoryRequest.inventory.name][] is empty or invalid, an
+ * SetInventoryRequest.set_mask google.cloud.retail.v2.SetInventoryRequest.set_mask.
+ * If SetInventoryRequest.inventory.name is empty or invalid, an
* INVALID_ARGUMENT error is returned.
* If the caller does not have permission to update the
- * [Product][google.cloud.retail.v2.Product] named in
- * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether
+ * Product google.cloud.retail.v2.Product named in
+ * Product.name google.cloud.retail.v2.Product.name, regardless of whether
* or not it exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2.Product] to update does not have
+ * If the Product google.cloud.retail.v2.Product to update does not have
* existing inventory information, the provided inventory information will be
* inserted.
- * If the [Product][google.cloud.retail.v2.Product] to update has existing
+ * If the Product google.cloud.retail.v2.Product to update has existing
* inventory information, the provided inventory information will be merged
* while respecting the last update time for each inventory field, using the
* provided or default value for
- * [SetInventoryRequest.set_time][google.cloud.retail.v2.SetInventoryRequest.set_time].
+ * SetInventoryRequest.set_time google.cloud.retail.v2.SetInventoryRequest.set_time.
* The last update time is recorded for the following inventory fields:
- * * [Product.price_info][google.cloud.retail.v2.Product.price_info]
- * * [Product.availability][google.cloud.retail.v2.Product.availability]
- * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity]
- * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info]
+ * * Product.price_info google.cloud.retail.v2.Product.price_info
+ * * Product.availability google.cloud.retail.v2.Product.availability
+ * * Product.available_quantity google.cloud.retail.v2.Product.available_quantity
+ * * Product.fulfillment_info google.cloud.retail.v2.Product.fulfillment_info
* If a full overwrite of inventory information while ignoring timestamps is
- * needed, [UpdateProduct][] should be invoked instead.
+ * needed, UpdateProduct should be invoked instead.
*/
- // const inventory = ''
+ // const inventory = {}
/**
* Indicates which inventory fields in the provided
- * [Product][google.cloud.retail.v2.Product] to update. If not set or set with
+ * Product google.cloud.retail.v2.Product to update. If not set or set with
* empty paths, all inventory fields will be updated.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned and the entire update will be ignored.
*/
- // const setMask = ''
+ // const setMask = {}
/**
* The time when the request is issued, used to prevent
* out-of-order updates on inventory fields with the last update time
* recorded. If not provided, the internal system time will be used.
*/
- // const setTime = ''
+ // const setTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2.Product] with name
- * [Product.name][google.cloud.retail.v2.Product.name] is not found, the
+ * If set to true, and the Product google.cloud.retail.v2.Product with name
+ * Product.name google.cloud.retail.v2.Product.name is not found, the
* inventory update will still be processed and retained for at most 1 day
- * until the [Product][google.cloud.retail.v2.Product] is created. If set to
+ * until the Product google.cloud.retail.v2.Product is created. If set to
* false, a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2.Product] is not found.
+ * Product google.cloud.retail.v2.Product is not found.
*/
// const allowMissing = true
@@ -81,7 +81,7 @@ function main(inventory) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function setInventory() {
+ async function callSetInventory() {
// Construct request
const request = {
inventory,
@@ -93,7 +93,7 @@ function main(inventory) {
console.log(response);
}
- setInventory();
+ callSetInventory();
// [END retail_v2_generated_ProductService_SetInventory_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js b/packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js
index c33232196c5..77f45bc400f 100644
--- a/packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js
@@ -22,26 +22,26 @@ function main(product) {
/**
* Required. The product to update/create.
* If the caller does not have permission to update the
- * [Product][google.cloud.retail.v2.Product], regardless of whether or not it
+ * Product google.cloud.retail.v2.Product, regardless of whether or not it
* exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2.Product] to update does not exist
+ * If the Product google.cloud.retail.v2.Product to update does not exist
* and
- * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing]
+ * allow_missing google.cloud.retail.v2.UpdateProductRequest.allow_missing
* is not set, a NOT_FOUND error is returned.
*/
- // const product = ''
+ // const product = {}
/**
* Indicates which fields in the provided
- * [Product][google.cloud.retail.v2.Product] to update. The immutable and
+ * Product google.cloud.retail.v2.Product to update. The immutable and
* output only fields are NOT supported. If not set, all supported fields (the
* fields that are neither immutable nor output only) are updated.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const updateMask = ''
+ // const updateMask = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2.Product] is not
- * found, a new [Product][google.cloud.retail.v2.Product] will be created. In
+ * If set to true, and the Product google.cloud.retail.v2.Product is not
+ * found, a new Product google.cloud.retail.v2.Product will be created. In
* this situation, `update_mask` is ignored.
*/
// const allowMissing = true
@@ -52,7 +52,7 @@ function main(product) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function updateProduct() {
+ async function callUpdateProduct() {
// Construct request
const request = {
product,
@@ -63,7 +63,7 @@ function main(product) {
console.log(response);
}
- updateProduct();
+ callUpdateProduct();
// [END retail_v2_generated_ProductService_UpdateProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/search_service.search.js b/packages/google-cloud-retail/samples/generated/v2/search_service.search.js
index 2d2c3c46678..76057c922d0 100644
--- a/packages/google-cloud-retail/samples/generated/v2/search_service.search.js
+++ b/packages/google-cloud-retail/samples/generated/v2/search_service.search.js
@@ -49,9 +49,9 @@ function main(placement, visitorId) {
/**
* User information.
*/
- // const userInfo = ''
+ // const userInfo = {}
/**
- * Maximum number of [Product][google.cloud.retail.v2.Product]s to return. If
+ * Maximum number of Product google.cloud.retail.v2.Product s to return. If
* unspecified, defaults to a reasonable value. The maximum allowed value is
* 120. Values above 120 will be coerced to 120.
* If this field is negative, an INVALID_ARGUMENT is returned.
@@ -59,21 +59,21 @@ function main(placement, visitorId) {
// const pageSize = 1234
/**
* A page token
- * [SearchResponse.next_page_token][google.cloud.retail.v2.SearchResponse.next_page_token],
+ * SearchResponse.next_page_token google.cloud.retail.v2.SearchResponse.next_page_token,
* received from a previous
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] call.
+ * SearchService.Search google.cloud.retail.v2.SearchService.Search call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] must
+ * SearchService.Search google.cloud.retail.v2.SearchService.Search must
* match the call that provided the page token. Otherwise, an INVALID_ARGUMENT
* error is returned.
*/
// const pageToken = 'abc123'
/**
* A 0-indexed integer that specifies the current offset (that is, starting
- * result location, amongst the [Product][google.cloud.retail.v2.Product]s
+ * result location, amongst the Product google.cloud.retail.v2.Product s
* deemed by the API as relevant) in search results. This field is only
- * considered if [page_token][google.cloud.retail.v2.SearchRequest.page_token]
+ * considered if page_token google.cloud.retail.v2.SearchRequest.page_token
* is unset.
* If this field is negative, an INVALID_ARGUMENT is returned.
*/
@@ -81,8 +81,8 @@ function main(placement, visitorId) {
/**
* The filter syntax consists of an expression language for constructing a
* predicate from one or more fields of the products being filtered. Filter
- * expression is case-sensitive. See more details at this [user
- * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+ * expression is case-sensitive. See more details at this user
+ * guide (https://cloud.google.com/retail/docs/filter-and-order#filter).
* If this field is unrecognizable, an INVALID_ARGUMENT is returned.
*/
// const filter = 'abc123'
@@ -90,19 +90,19 @@ function main(placement, visitorId) {
* The filter applied to every search request when quality improvement such as
* query expansion is needed. For example, if a query does not have enough
* results, an expanded query with
- * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter]
+ * SearchRequest.canonical_filter google.cloud.retail.v2.SearchRequest.canonical_filter
* will be returned as a supplement of the original query. This field is
* strongly recommended to achieve high search quality.
- * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
+ * See SearchRequest.filter google.cloud.retail.v2.SearchRequest.filter for
* more details about filter syntax.
*/
// const canonicalFilter = 'abc123'
/**
* The order in which products are returned. Products can be ordered by
- * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
+ * a field in an Product google.cloud.retail.v2.Product object. Leave it
* unset if ordered by relevance. OrderBy expression is case-sensitive. See
- * more details at this [user
- * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+ * more details at this user
+ * guide (https://cloud.google.com/retail/docs/filter-and-order#order).
* If this field is unrecognizable, an INVALID_ARGUMENT is returned.
*/
// const orderBy = 'abc123'
@@ -118,33 +118,33 @@ function main(placement, visitorId) {
* This feature requires additional allowlisting. Contact Retail Search
* support team if you are interested in using dynamic facet feature.
*/
- // const dynamicFacetSpec = ''
+ // const dynamicFacetSpec = {}
/**
* Boost specification to boost certain products. See more details at this
- * [user guide](https://cloud.google.com/retail/docs/boosting).
- * Notice that if both [ServingConfig.boost_control_ids][] and
- * [SearchRequest.boost_spec] are set, the boost conditions from both places
+ * user guide (https://cloud.google.com/retail/docs/boosting).
+ * Notice that if both ServingConfig.boost_control_ids and
+ * SearchRequest.boost_spec are set, the boost conditions from both places
* are evaluated. If a search request matches multiple boost conditions,
* the final boost score is equal to the sum of the boost scores from all
* matched boost conditions.
*/
- // const boostSpec = ''
+ // const boostSpec = {}
/**
* The query expansion specification that specifies the conditions under which
- * query expansion will occur. See more details at this [user
- * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+ * query expansion will occur. See more details at this user
+ * guide (https://cloud.google.com/retail/docs/result-size#query_expansion).
*/
- // const queryExpansionSpec = ''
+ // const queryExpansionSpec = {}
/**
* The keys to fetch and rollup the matching
- * [variant][google.cloud.retail.v2.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2.Product]s attributes. The attributes from
- * all the matching [variant][google.cloud.retail.v2.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2.Product]s are merged and de-duplicated.
- * Notice that rollup [variant][google.cloud.retail.v2.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2.Product]s attributes will lead to extra
+ * variant google.cloud.retail.v2.Product.Type.VARIANT
+ * Product google.cloud.retail.v2.Product s attributes. The attributes from
+ * all the matching variant google.cloud.retail.v2.Product.Type.VARIANT
+ * Product google.cloud.retail.v2.Product s are merged and de-duplicated.
+ * Notice that rollup variant google.cloud.retail.v2.Product.Type.VARIANT
+ * Product google.cloud.retail.v2.Product s attributes will lead to extra
* query latency. Maximum number of keys is 10.
- * For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], a
+ * For FulfillmentInfo google.cloud.retail.v2.FulfillmentInfo, a
* fulfillment type and a fulfillment ID must be provided in the format of
* "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
* "pickupInStore" is fulfillment type and "store123" is the store ID.
@@ -155,42 +155,42 @@ function main(placement, visitorId) {
* * discount
* * inventory(place_id,price)
* * attributes.key, where key is any key in the
- * [Product.attributes][google.cloud.retail.v2.Product.attributes] map.
+ * Product.attributes google.cloud.retail.v2.Product.attributes map.
* * pickupInStore.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "pickup-in-store".
* * shipToStore.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "ship-to-store".
* * sameDayDelivery.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "same-day-delivery".
* * nextDayDelivery.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "next-day-delivery".
* * customFulfillment1.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "custom-type-1".
* * customFulfillment2.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "custom-type-2".
* * customFulfillment3.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "custom-type-3".
* * customFulfillment4.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "custom-type-4".
* * customFulfillment5.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2.FulfillmentInfo.type
* "custom-type-5".
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
@@ -200,20 +200,20 @@ function main(placement, visitorId) {
* The categories associated with a category page. Required for category
* navigation queries to achieve good search quality. The format should be
* the same as
- * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+ * UserEvent.page_categories google.cloud.retail.v2.UserEvent.page_categories;
* To represent full path of category, use '>' sign to separate different
* hierarchies. If '>' is part of the category name, please replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
- * "pageCategories" : ["Sales > 2017 Black Friday Deals"].
+ * "pageCategories" : "Sales > 2017 Black Friday Deals".
*/
// const pageCategories = 'abc123'
/**
* The search mode of the search request. If not specified, a single search
* request triggers both product search and faceted search.
*/
- // const searchMode = ''
+ // const searchMode = {}
// Imports the Retail library
const {SearchServiceClient} = require('@google-cloud/retail').v2;
@@ -221,7 +221,7 @@ function main(placement, visitorId) {
// Instantiates a client
const retailClient = new SearchServiceClient();
- async function search() {
+ async function callSearch() {
// Construct request
const request = {
placement,
@@ -235,7 +235,7 @@ function main(placement, visitorId) {
}
}
- search();
+ callSearch();
// [END retail_v2_generated_SearchService_Search_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js
index a0bb51b5744..50c7eb99818 100644
--- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js
+++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js
@@ -49,7 +49,7 @@ function main(parent, userEvent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function collectUserEvent() {
+ async function callCollectUserEvent() {
// Construct request
const request = {
parent,
@@ -61,7 +61,7 @@ function main(parent, userEvent) {
console.log(response);
}
- collectUserEvent();
+ callCollectUserEvent();
// [END retail_v2_generated_UserEventService_CollectUserEvent_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js
index 1c8ebdd5030..5231d461f59 100644
--- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js
@@ -26,12 +26,12 @@ function main(parent, inputConfig) {
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* The desired location of errors incurred during the Import. Cannot be set
* for inline user event imports.
*/
- // const errorsConfig = ''
+ // const errorsConfig = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2;
@@ -39,7 +39,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function importUserEvents() {
+ async function callImportUserEvents() {
// Construct request
const request = {
parent,
@@ -52,7 +52,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importUserEvents();
+ callImportUserEvents();
// [END retail_v2_generated_UserEventService_ImportUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js
index 88eadd9b912..16ee8277860 100644
--- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js
@@ -30,7 +30,7 @@ function main(parent, filter) {
* length limit of 5,000 characters. Empty string filter is not allowed. The
* eligible fields for filtering are:
* * `eventType`: Double quoted
- * [UserEvent.event_type][google.cloud.retail.v2.UserEvent.event_type] string.
+ * UserEvent.event_type google.cloud.retail.v2.UserEvent.event_type string.
* * `eventTime`: in ISO 8601 "zulu" format.
* * `visitorId`: Double quoted string. Specifying this will delete all
* events associated with a visitor.
@@ -60,7 +60,7 @@ function main(parent, filter) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function purgeUserEvents() {
+ async function callPurgeUserEvents() {
// Construct request
const request = {
parent,
@@ -73,7 +73,7 @@ function main(parent, filter) {
console.log(response);
}
- purgeUserEvents();
+ callPurgeUserEvents();
// [END retail_v2_generated_UserEventService_PurgeUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js
index 9deba00979e..5db922eebeb 100644
--- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js
@@ -30,7 +30,7 @@ function main(parent) {
* USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
* invalid integer value.
*/
- // const userEventRejoinScope = ''
+ // const userEventRejoinScope = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2;
@@ -38,7 +38,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function rejoinUserEvents() {
+ async function callRejoinUserEvents() {
// Construct request
const request = {
parent,
@@ -50,7 +50,7 @@ function main(parent) {
console.log(response);
}
- rejoinUserEvents();
+ callRejoinUserEvents();
// [END retail_v2_generated_UserEventService_RejoinUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js
index ab2e40b76a6..a7b975cbaca 100644
--- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js
+++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js
@@ -27,7 +27,7 @@ function main(parent, userEvent) {
/**
* Required. User event to write.
*/
- // const userEvent = ''
+ // const userEvent = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2;
@@ -35,7 +35,7 @@ function main(parent, userEvent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function writeUserEvent() {
+ async function callWriteUserEvent() {
// Construct request
const request = {
parent,
@@ -47,7 +47,7 @@ function main(parent, userEvent) {
console.log(response);
}
- writeUserEvent();
+ callWriteUserEvent();
// [END retail_v2_generated_UserEventService_WriteUserEvent_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js
index 99a60b93cfd..9021acdc304 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js
@@ -31,7 +31,7 @@ function main() {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function getDefaultBranch() {
+ async function callGetDefaultBranch() {
// Construct request
const request = {};
@@ -40,7 +40,7 @@ function main() {
console.log(response);
}
- getDefaultBranch();
+ callGetDefaultBranch();
// [END retail_v2alpha_generated_CatalogService_GetDefaultBranch_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js
index 22d71c2a9c7..9d856ca78de 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js
@@ -22,13 +22,13 @@ function main(parent) {
/**
* Required. The account resource name with an associated location.
* If the caller does not have permission to list
- * [Catalog][google.cloud.retail.v2alpha.Catalog]s under this location,
+ * Catalog google.cloud.retail.v2alpha.Catalog s under this location,
* regardless of whether or not this location exists, a PERMISSION_DENIED
* error is returned.
*/
// const parent = 'abc123'
/**
- * Maximum number of [Catalog][google.cloud.retail.v2alpha.Catalog]s to
+ * Maximum number of Catalog google.cloud.retail.v2alpha.Catalog s to
* return. If unspecified, defaults to 50. The maximum allowed value is 1000.
* Values above 1000 will be coerced to 1000.
* If this field is negative, an INVALID_ARGUMENT is returned.
@@ -36,12 +36,12 @@ function main(parent) {
// const pageSize = 1234
/**
* A page token
- * [ListCatalogsResponse.next_page_token][google.cloud.retail.v2alpha.ListCatalogsResponse.next_page_token],
+ * ListCatalogsResponse.next_page_token google.cloud.retail.v2alpha.ListCatalogsResponse.next_page_token,
* received from a previous
- * [CatalogService.ListCatalogs][google.cloud.retail.v2alpha.CatalogService.ListCatalogs]
+ * CatalogService.ListCatalogs google.cloud.retail.v2alpha.CatalogService.ListCatalogs
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [CatalogService.ListCatalogs][google.cloud.retail.v2alpha.CatalogService.ListCatalogs]
+ * CatalogService.ListCatalogs google.cloud.retail.v2alpha.CatalogService.ListCatalogs
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
@@ -53,7 +53,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function listCatalogs() {
+ async function callListCatalogs() {
// Construct request
const request = {
parent,
@@ -66,7 +66,7 @@ function main(parent) {
}
}
- listCatalogs();
+ callListCatalogs();
// [END retail_v2alpha_generated_CatalogService_ListCatalogs_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js
index 048d8633fd0..391e65e0ef8 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js
@@ -32,7 +32,7 @@ function main() {
// const branchId = 'abc123'
/**
* Some note on this request, this can be retrieved by
- * [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch]
+ * CatalogService.GetDefaultBranch google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch
* before next valid default branch set occurs.
* This field must be a UTF-8 encoded string with a length limit of 1,000
* characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -45,7 +45,7 @@ function main() {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function setDefaultBranch() {
+ async function callSetDefaultBranch() {
// Construct request
const request = {};
@@ -54,7 +54,7 @@ function main() {
console.log(response);
}
- setDefaultBranch();
+ callSetDefaultBranch();
// [END retail_v2alpha_generated_CatalogService_SetDefaultBranch_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js
index f947d928485..a77df06cc26 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js
@@ -20,21 +20,21 @@ function main(catalog) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
- * Required. The [Catalog][google.cloud.retail.v2alpha.Catalog] to update.
+ * Required. The Catalog google.cloud.retail.v2alpha.Catalog to update.
* If the caller does not have permission to update the
- * [Catalog][google.cloud.retail.v2alpha.Catalog], regardless of whether or
+ * Catalog google.cloud.retail.v2alpha.Catalog, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
- * If the [Catalog][google.cloud.retail.v2alpha.Catalog] to update does not
+ * If the Catalog google.cloud.retail.v2alpha.Catalog to update does not
* exist, a NOT_FOUND error is returned.
*/
- // const catalog = ''
+ // const catalog = {}
/**
* Indicates which fields in the provided
- * [Catalog][google.cloud.retail.v2alpha.Catalog] to update.
+ * Catalog google.cloud.retail.v2alpha.Catalog to update.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const updateMask = ''
+ // const updateMask = {}
// Imports the Retail library
const {CatalogServiceClient} = require('@google-cloud/retail').v2alpha;
@@ -42,7 +42,7 @@ function main(catalog) {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function updateCatalog() {
+ async function callUpdateCatalog() {
// Construct request
const request = {
catalog,
@@ -53,7 +53,7 @@ function main(catalog) {
console.log(response);
}
- updateCatalog();
+ callUpdateCatalog();
// [END retail_v2alpha_generated_CatalogService_UpdateCatalog_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js b/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js
index 9fdbf04b281..c74af7fcebd 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js
@@ -43,7 +43,7 @@ function main(catalog, query) {
* The list of languages of the query. This is
* the BCP-47 language code, such as "en-US" or "sr-Latn".
* For more information, see
- * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+ * Tags for Identifying Languages (https://tools.ietf.org/html/bcp47).
* The maximum number of allowed characters is 255.
* Only "en-US" is currently supported.
*/
@@ -63,7 +63,7 @@ function main(catalog, query) {
/**
* Determines which dataset to use for fetching completion. "user-data" will
* use the imported dataset through
- * [CompletionService.ImportCompletionData][google.cloud.retail.v2alpha.CompletionService.ImportCompletionData].
+ * CompletionService.ImportCompletionData google.cloud.retail.v2alpha.CompletionService.ImportCompletionData.
* "cloud-retail" will use the dataset generated by cloud retail based on user
* events. If leave empty, it will use the "user-data".
* Current supported values:
@@ -76,7 +76,7 @@ function main(catalog, query) {
/**
* Completion max suggestions. If left unset or set to 0, then will fallback
* to the configured value
- * [CompletionConfig.max_suggestions][google.cloud.retail.v2alpha.CompletionConfig.max_suggestions].
+ * CompletionConfig.max_suggestions google.cloud.retail.v2alpha.CompletionConfig.max_suggestions.
* The maximum allowed max suggestions is 20. If it is set higher, it will be
* capped by 20.
*/
@@ -88,7 +88,7 @@ function main(catalog, query) {
// Instantiates a client
const retailClient = new CompletionServiceClient();
- async function completeQuery() {
+ async function callCompleteQuery() {
// Construct request
const request = {
catalog,
@@ -100,7 +100,7 @@ function main(catalog, query) {
console.log(response);
}
- completeQuery();
+ callCompleteQuery();
// [END retail_v2alpha_generated_CompletionService_CompleteQuery_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js b/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js
index b4a8ad05490..d681cc9e989 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js
@@ -27,12 +27,12 @@ function main(parent, inputConfig) {
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* Pub/Sub topic for receiving notification. If this field is set,
* when the import is finished, a notification will be sent to
* specified Pub/Sub topic. The message data will be JSON string of a
- * [Operation][google.longrunning.Operation].
+ * Operation google.longrunning.Operation.
* Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
*/
// const notificationPubsubTopic = 'abc123'
@@ -43,7 +43,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new CompletionServiceClient();
- async function importCompletionData() {
+ async function callImportCompletionData() {
// Construct request
const request = {
parent,
@@ -56,7 +56,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importCompletionData();
+ callImportCompletionData();
// [END retail_v2alpha_generated_CompletionService_ImportCompletionData_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js b/packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js
index 43d369b4ff3..7f5cccba9e0 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js
@@ -24,8 +24,8 @@ function main(placement, userEvent) {
* {name=projects/* /locations/global/catalogs/default_catalog/placements/*}
* The ID of the Recommendations AI placement. Before you can request
* predictions from your model, you must create at least one placement for it.
- * For more information, see [Managing
- * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
+ * For more information, see Managing
+ * placements (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
* The full list of available placements can be seen at
* https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
*/
@@ -36,7 +36,7 @@ function main(placement, userEvent) {
* won't be ingested to userEvent logs. Thus, a separate userEvent write
* request is required for event logging.
*/
- // const userEvent = ''
+ // const userEvent = {}
/**
* Maximum number of results to return per page. Set this property
* to the number of prediction results needed. If zero, the service will
@@ -117,8 +117,8 @@ function main(placement, userEvent) {
* * The key portion of a label must be unique. However, you can use the same
* key with multiple resources.
* * Keys must start with a lowercase letter or international character.
- * See [Google Cloud
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+ * See Google Cloud
+ * Document (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
* for more details.
*/
// const labels = 1234
@@ -129,7 +129,7 @@ function main(placement, userEvent) {
// Instantiates a client
const retailClient = new PredictionServiceClient();
- async function predict() {
+ async function callPredict() {
// Construct request
const request = {
placement,
@@ -141,7 +141,7 @@ function main(placement, userEvent) {
console.log(response);
}
- predict();
+ callPredict();
// [END retail_v2alpha_generated_PredictionService_Predict_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js
index 8fbf919b768..fdb7d59aaeb 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js
@@ -21,10 +21,10 @@ function main(product, type, placeIds) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2alpha.Product], such as
+ * Product google.cloud.retail.v2alpha.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -43,22 +43,22 @@ function main(product, type, placeIds) {
* * "custom-type-5"
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
- * This field directly corresponds to [Product.fulfillment_info.type][].
+ * This field directly corresponds to Product.fulfillment_info.type .
*/
// const type = 'abc123'
/**
* Required. The IDs for this
- * [type][google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest.type], such
+ * type google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest.type, such
* as the store IDs for "pickup-in-store" or the region IDs for
* "same-day-delivery" to be added for this
- * [type][google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest.type].
+ * type google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest.type.
* Duplicate IDs will be automatically ignored.
* At least 1 value is required, and a maximum of 2000 values are allowed.
* Each value must be a string with a length limit of 10 characters, matching
* the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
* INVALID_ARGUMENT error is returned.
* If the total number of place IDs exceeds 2000 for this
- * [type][google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest.type] after
+ * type google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest.type after
* adding, then the update will be rejected.
*/
// const placeIds = 'abc123'
@@ -67,14 +67,14 @@ function main(product, type, placeIds) {
* out-of-order updates on fulfillment information. If not provided, the
* internal system time will be used.
*/
- // const addTime = ''
+ // const addTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
+ * If set to true, and the Product google.cloud.retail.v2alpha.Product is
* not found, the fulfillment information will still be processed and retained
* for at most 1 day and processed once the
- * [Product][google.cloud.retail.v2alpha.Product] is created. If set to false,
+ * Product google.cloud.retail.v2alpha.Product is created. If set to false,
* a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2alpha.Product] is not found.
+ * Product google.cloud.retail.v2alpha.Product is not found.
*/
// const allowMissing = true
@@ -84,7 +84,7 @@ function main(product, type, placeIds) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function addFulfillmentPlaces() {
+ async function callAddFulfillmentPlaces() {
// Construct request
const request = {
product,
@@ -98,7 +98,7 @@ function main(product, type, placeIds) {
console.log(response);
}
- addFulfillmentPlaces();
+ callAddFulfillmentPlaces();
// [END retail_v2alpha_generated_ProductService_AddFulfillmentPlaces_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js
index efb10e417fe..97c63276279 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js
@@ -21,10 +21,10 @@ function main(product, localInventories) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2alpha.Product], such as
+ * Product google.cloud.retail.v2alpha.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -36,7 +36,7 @@ function main(product, localInventories) {
// const localInventories = 1234
/**
* Indicates which inventory fields in the provided list of
- * [LocalInventory][google.cloud.retail.v2alpha.LocalInventory] to update. The
+ * LocalInventory google.cloud.retail.v2alpha.LocalInventory to update. The
* field is updated to the provided value.
* If a field is set while the place does not have a previous local inventory,
* the local inventory at that store is created.
@@ -47,20 +47,20 @@ function main(product, localInventories) {
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned and the entire update will be ignored.
*/
- // const addMask = ''
+ // const addMask = {}
/**
* The time when the inventory updates are issued. Used to prevent
* out-of-order updates on local inventory fields. If not provided, the
* internal system time will be used.
*/
- // const addTime = ''
+ // const addTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
+ * If set to true, and the Product google.cloud.retail.v2alpha.Product is
* not found, the local inventory will still be processed and retained for at
* most 1 day and processed once the
- * [Product][google.cloud.retail.v2alpha.Product] is created. If set to false,
+ * Product google.cloud.retail.v2alpha.Product is created. If set to false,
* an INVALID_ARGUMENT error is returned if the
- * [Product][google.cloud.retail.v2alpha.Product] is not found.
+ * Product google.cloud.retail.v2alpha.Product is not found.
*/
// const allowMissing = true
@@ -70,7 +70,7 @@ function main(product, localInventories) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function addLocalInventories() {
+ async function callAddLocalInventories() {
// Construct request
const request = {
product,
@@ -83,7 +83,7 @@ function main(product, localInventories) {
console.log(response);
}
- addLocalInventories();
+ callAddLocalInventories();
// [END retail_v2alpha_generated_ProductService_AddLocalInventories_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js
index e9be2372ad5..540bbfa7be9 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js
@@ -25,19 +25,19 @@ function main(parent, product, productId) {
*/
// const parent = 'abc123'
/**
- * Required. The [Product][google.cloud.retail.v2alpha.Product] to create.
+ * Required. The Product google.cloud.retail.v2alpha.Product to create.
*/
- // const product = ''
+ // const product = {}
/**
* Required. The ID to use for the
- * [Product][google.cloud.retail.v2alpha.Product], which will become the final
- * component of the [Product.name][google.cloud.retail.v2alpha.Product.name].
+ * Product google.cloud.retail.v2alpha.Product, which will become the final
+ * component of the Product.name google.cloud.retail.v2alpha.Product.name.
* If the caller does not have permission to create the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
* This field must be unique among all
- * [Product][google.cloud.retail.v2alpha.Product]s with the same
- * [parent][google.cloud.retail.v2alpha.CreateProductRequest.parent].
+ * Product google.cloud.retail.v2alpha.Product s with the same
+ * parent google.cloud.retail.v2alpha.CreateProductRequest.parent.
* Otherwise, an ALREADY_EXISTS error is returned.
* This field must be a UTF-8 encoded string with a length limit of 128
* characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -50,7 +50,7 @@ function main(parent, product, productId) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function createProduct() {
+ async function callCreateProduct() {
// Construct request
const request = {
parent,
@@ -63,7 +63,7 @@ function main(parent, product, productId) {
console.log(response);
}
- createProduct();
+ callCreateProduct();
// [END retail_v2alpha_generated_ProductService_CreateProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js
index 1e7d7af8e95..a68cc635bd6 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js
@@ -21,23 +21,23 @@ function main(name) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2alpha.Product], such as
+ * Product google.cloud.retail.v2alpha.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to delete the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2alpha.Product] to delete does not
+ * If the Product google.cloud.retail.v2alpha.Product to delete does not
* exist, a NOT_FOUND error is returned.
- * The [Product][google.cloud.retail.v2alpha.Product] to delete can neither be
+ * The Product google.cloud.retail.v2alpha.Product to delete can neither be
* a
- * [Product.Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2alpha.Product] member nor a
- * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2alpha.Product] with more than one
- * [variants][google.cloud.retail.v2alpha.Product.Type.VARIANT]. Otherwise, an
+ * Product.Type.COLLECTION google.cloud.retail.v2alpha.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2alpha.Product member nor a
+ * Product.Type.PRIMARY google.cloud.retail.v2alpha.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2alpha.Product with more than one
+ * variants google.cloud.retail.v2alpha.Product.Type.VARIANT. Otherwise, an
* INVALID_ARGUMENT error is returned.
* All inventory information for the named
- * [Product][google.cloud.retail.v2alpha.Product] will be deleted.
+ * Product google.cloud.retail.v2alpha.Product will be deleted.
*/
// const name = 'abc123'
@@ -47,7 +47,7 @@ function main(name) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function deleteProduct() {
+ async function callDeleteProduct() {
// Construct request
const request = {
name,
@@ -58,7 +58,7 @@ function main(name) {
console.log(response);
}
- deleteProduct();
+ callDeleteProduct();
// [END retail_v2alpha_generated_ProductService_DeleteProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js
index bbd194262c0..d37ebf466da 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js
@@ -21,12 +21,12 @@ function main(name) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2alpha.Product], such as
+ * Product google.cloud.retail.v2alpha.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
- * If the requested [Product][google.cloud.retail.v2alpha.Product] does not
+ * If the requested Product google.cloud.retail.v2alpha.Product does not
* exist, a NOT_FOUND error is returned.
*/
// const name = 'abc123'
@@ -37,7 +37,7 @@ function main(name) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function getProduct() {
+ async function callGetProduct() {
// Construct request
const request = {
name,
@@ -48,7 +48,7 @@ function main(name) {
console.log(response);
}
- getProduct();
+ callGetProduct();
// [END retail_v2alpha_generated_ProductService_GetProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js
index ca380013932..7b28b9288e9 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js
@@ -31,39 +31,39 @@ function main(parent, inputConfig) {
* dataset scope. Ensures idempotency and used for request deduplication.
* Server-generated if unspecified. Up to 128 characters long and must match
* the pattern: `[a-zA-Z0-9_]+`. This is returned as [Operation.name][] in
- * [ImportMetadata][google.cloud.retail.v2alpha.ImportMetadata].
+ * ImportMetadata google.cloud.retail.v2alpha.ImportMetadata.
* Only supported when
- * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
+ * ImportProductsRequest.reconciliation_mode google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode
* is set to `FULL`.
*/
// const requestId = 'abc123'
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* The desired location of errors incurred during the Import.
*/
- // const errorsConfig = ''
+ // const errorsConfig = {}
/**
* Indicates which fields in the provided imported 'products' to update. If
* not set, will by default update all fields.
*/
- // const updateMask = ''
+ // const updateMask = {}
/**
* The mode of reconciliation between existing products and the products to be
* imported. Defaults to
- * [ReconciliationMode.INCREMENTAL][google.cloud.retail.v2alpha.ImportProductsRequest.ReconciliationMode.INCREMENTAL].
+ * ReconciliationMode.INCREMENTAL google.cloud.retail.v2alpha.ImportProductsRequest.ReconciliationMode.INCREMENTAL.
*/
- // const reconciliationMode = ''
+ // const reconciliationMode = {}
/**
* Pub/Sub topic for receiving notification. If this field is set,
* when the import is finished, a notification will be sent to
* specified Pub/Sub topic. The message data will be JSON string of a
- * [Operation][google.longrunning.Operation].
+ * Operation google.longrunning.Operation.
* Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
* Only supported when
- * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
+ * ImportProductsRequest.reconciliation_mode google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode
* is set to `FULL`.
*/
// const notificationPubsubTopic = 'abc123'
@@ -74,7 +74,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function importProducts() {
+ async function callImportProducts() {
// Construct request
const request = {
parent,
@@ -87,7 +87,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importProducts();
+ callImportProducts();
// [END retail_v2alpha_generated_ProductService_ImportProducts_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js
index 594bb847be6..ecda1d1cea4 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js
@@ -25,13 +25,13 @@ function main(parent) {
* `default_branch` as the branch ID, to list products under the default
* branch.
* If the caller does not have permission to list
- * [Product][google.cloud.retail.v2alpha.Product]s under this branch,
+ * Product google.cloud.retail.v2alpha.Product s under this branch,
* regardless of whether or not this branch exists, a PERMISSION_DENIED error
* is returned.
*/
// const parent = 'abc123'
/**
- * Maximum number of [Product][google.cloud.retail.v2alpha.Product]s to
+ * Maximum number of Product google.cloud.retail.v2alpha.Product s to
* return. If unspecified, defaults to 100. The maximum allowed value is 1000.
* Values above 1000 will be coerced to 1000.
* If this field is negative, an INVALID_ARGUMENT error is returned.
@@ -39,12 +39,12 @@ function main(parent) {
// const pageSize = 1234
/**
* A page token
- * [ListProductsResponse.next_page_token][google.cloud.retail.v2alpha.ListProductsResponse.next_page_token],
+ * ListProductsResponse.next_page_token google.cloud.retail.v2alpha.ListProductsResponse.next_page_token,
* received from a previous
- * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]
+ * ProductService.ListProducts google.cloud.retail.v2alpha.ProductService.ListProducts
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]
+ * ProductService.ListProducts google.cloud.retail.v2alpha.ProductService.ListProducts
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
@@ -52,54 +52,54 @@ function main(parent) {
/**
* A filter to apply on the list results. Supported features:
* * List all the products under the parent branch if
- * [filter][google.cloud.retail.v2alpha.ListProductsRequest.filter] is unset.
+ * filter google.cloud.retail.v2alpha.ListProductsRequest.filter is unset.
* * List
- * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2alpha.Product]s sharing the same
- * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2alpha.Product]. For example:
+ * Product.Type.VARIANT google.cloud.retail.v2alpha.Product.Type.VARIANT
+ * Product google.cloud.retail.v2alpha.Product s sharing the same
+ * Product.Type.PRIMARY google.cloud.retail.v2alpha.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2alpha.Product. For example:
* `primary_product_id = "some_product_id"`
- * * List [Product][google.cloud.retail.v2alpha.Product]s bundled in a
- * [Product.Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2alpha.Product].
+ * * List Product google.cloud.retail.v2alpha.Product s bundled in a
+ * Product.Type.COLLECTION google.cloud.retail.v2alpha.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2alpha.Product.
* For example:
* `collection_product_id = "some_product_id"`
- * * List [Product][google.cloud.retail.v2alpha.Product]s with a partibular
+ * * List Product google.cloud.retail.v2alpha.Product s with a partibular
* type. For example:
* `type = "PRIMARY"`
* `type = "VARIANT"`
* `type = "COLLECTION"`
* If the field is unrecognizable, an INVALID_ARGUMENT error is returned.
* If the specified
- * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2alpha.Product] or
- * [Product.Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2alpha.Product] does not exist, a NOT_FOUND
+ * Product.Type.PRIMARY google.cloud.retail.v2alpha.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2alpha.Product or
+ * Product.Type.COLLECTION google.cloud.retail.v2alpha.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2alpha.Product does not exist, a NOT_FOUND
* error is returned.
*/
// const filter = 'abc123'
/**
- * The fields of [Product][google.cloud.retail.v2alpha.Product] to return in
+ * The fields of Product google.cloud.retail.v2alpha.Product to return in
* the responses. If not set or empty, the following fields are returned:
- * * [Product.name][google.cloud.retail.v2alpha.Product.name]
- * * [Product.id][google.cloud.retail.v2alpha.Product.id]
- * * [Product.title][google.cloud.retail.v2alpha.Product.title]
- * * [Product.uri][google.cloud.retail.v2alpha.Product.uri]
- * * [Product.images][google.cloud.retail.v2alpha.Product.images]
- * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
- * * [Product.brands][google.cloud.retail.v2alpha.Product.brands]
+ * * Product.name google.cloud.retail.v2alpha.Product.name
+ * * Product.id google.cloud.retail.v2alpha.Product.id
+ * * Product.title google.cloud.retail.v2alpha.Product.title
+ * * Product.uri google.cloud.retail.v2alpha.Product.uri
+ * * Product.images google.cloud.retail.v2alpha.Product.images
+ * * Product.price_info google.cloud.retail.v2alpha.Product.price_info
+ * * Product.brands google.cloud.retail.v2alpha.Product.brands
* If "*" is provided, all fields are returned.
- * [Product.name][google.cloud.retail.v2alpha.Product.name] is always returned
+ * Product.name google.cloud.retail.v2alpha.Product.name is always returned
* no matter what mask is set.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const readMask = ''
+ // const readMask = {}
/**
* If true and
- * [page_token][google.cloud.retail.v2alpha.ListProductsRequest.page_token] is
+ * page_token google.cloud.retail.v2alpha.ListProductsRequest.page_token is
* empty,
- * [ListProductsResponse.total_size][google.cloud.retail.v2alpha.ListProductsResponse.total_size]
+ * ListProductsResponse.total_size google.cloud.retail.v2alpha.ListProductsResponse.total_size
* is set to the total count of matched items irrespective of pagination.
* Notice that setting this field to true affects the performance.
*/
@@ -111,7 +111,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function listProducts() {
+ async function callListProducts() {
// Construct request
const request = {
parent,
@@ -124,7 +124,7 @@ function main(parent) {
}
}
- listProducts();
+ callListProducts();
// [END retail_v2alpha_generated_ProductService_ListProducts_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js
index a69eb6fcfe9..6360a86186c 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js
@@ -21,10 +21,10 @@ function main(product, type, placeIds) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2alpha.Product], such as
+ * Product google.cloud.retail.v2alpha.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -43,15 +43,15 @@ function main(product, type, placeIds) {
* * "custom-type-5"
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
- * This field directly corresponds to [Product.fulfillment_info.type][].
+ * This field directly corresponds to Product.fulfillment_info.type .
*/
// const type = 'abc123'
/**
* Required. The IDs for this
- * [type][google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest.type],
+ * type google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest.type,
* such as the store IDs for "pickup-in-store" or the region IDs for
* "same-day-delivery", to be removed for this
- * [type][google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest.type].
+ * type google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest.type.
* At least 1 value is required, and a maximum of 2000 values are allowed.
* Each value must be a string with a length limit of 10 characters, matching
* the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
@@ -63,14 +63,14 @@ function main(product, type, placeIds) {
* out-of-order updates on fulfillment information. If not provided, the
* internal system time will be used.
*/
- // const removeTime = ''
+ // const removeTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
+ * If set to true, and the Product google.cloud.retail.v2alpha.Product is
* not found, the fulfillment information will still be processed and retained
* for at most 1 day and processed once the
- * [Product][google.cloud.retail.v2alpha.Product] is created. If set to false,
+ * Product google.cloud.retail.v2alpha.Product is created. If set to false,
* a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2alpha.Product] is not found.
+ * Product google.cloud.retail.v2alpha.Product is not found.
*/
// const allowMissing = true
@@ -80,7 +80,7 @@ function main(product, type, placeIds) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function removeFulfillmentPlaces() {
+ async function callRemoveFulfillmentPlaces() {
// Construct request
const request = {
product,
@@ -94,7 +94,7 @@ function main(product, type, placeIds) {
console.log(response);
}
- removeFulfillmentPlaces();
+ callRemoveFulfillmentPlaces();
// [END retail_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js
index e3d7d059114..4210ef328ed 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js
@@ -21,10 +21,10 @@ function main(product, placeIds) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2alpha.Product], such as
+ * Product google.cloud.retail.v2alpha.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -38,14 +38,14 @@ function main(product, placeIds) {
* out-of-order updates and deletions on local inventory fields. If not
* provided, the internal system time will be used.
*/
- // const removeTime = ''
+ // const removeTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
+ * If set to true, and the Product google.cloud.retail.v2alpha.Product is
* not found, the local inventory removal request will still be processed and
* retained for at most 1 day and processed once the
- * [Product][google.cloud.retail.v2alpha.Product] is created. If set to false,
+ * Product google.cloud.retail.v2alpha.Product is created. If set to false,
* a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2alpha.Product] is not found.
+ * Product google.cloud.retail.v2alpha.Product is not found.
*/
// const allowMissing = true
@@ -55,7 +55,7 @@ function main(product, placeIds) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function removeLocalInventories() {
+ async function callRemoveLocalInventories() {
// Construct request
const request = {
product,
@@ -68,7 +68,7 @@ function main(product, placeIds) {
console.log(response);
}
- removeLocalInventories();
+ callRemoveLocalInventories();
// [END retail_v2alpha_generated_ProductService_RemoveLocalInventories_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js
index d9333c64444..72b2b9d96aa 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js
@@ -22,56 +22,56 @@ function main(inventory) {
/**
* Required. The inventory information to update. The allowable fields to
* update are:
- * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
- * * [Product.availability][google.cloud.retail.v2alpha.Product.availability]
- * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity]
- * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info]
+ * * Product.price_info google.cloud.retail.v2alpha.Product.price_info
+ * * Product.availability google.cloud.retail.v2alpha.Product.availability
+ * * Product.available_quantity google.cloud.retail.v2alpha.Product.available_quantity
+ * * Product.fulfillment_info google.cloud.retail.v2alpha.Product.fulfillment_info
* The updated inventory fields must be specified in
- * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask].
- * If [SetInventoryRequest.inventory.name][] is empty or invalid, an
+ * SetInventoryRequest.set_mask google.cloud.retail.v2alpha.SetInventoryRequest.set_mask.
+ * If SetInventoryRequest.inventory.name is empty or invalid, an
* INVALID_ARGUMENT error is returned.
* If the caller does not have permission to update the
- * [Product][google.cloud.retail.v2alpha.Product] named in
- * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of
+ * Product google.cloud.retail.v2alpha.Product named in
+ * Product.name google.cloud.retail.v2alpha.Product.name, regardless of
* whether or not it exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2alpha.Product] to update does not
+ * If the Product google.cloud.retail.v2alpha.Product to update does not
* have existing inventory information, the provided inventory information
* will be inserted.
- * If the [Product][google.cloud.retail.v2alpha.Product] to update has
+ * If the Product google.cloud.retail.v2alpha.Product to update has
* existing inventory information, the provided inventory information will be
* merged while respecting the last update time for each inventory field,
* using the provided or default value for
- * [SetInventoryRequest.set_time][google.cloud.retail.v2alpha.SetInventoryRequest.set_time].
+ * SetInventoryRequest.set_time google.cloud.retail.v2alpha.SetInventoryRequest.set_time.
* The last update time is recorded for the following inventory fields:
- * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
- * * [Product.availability][google.cloud.retail.v2alpha.Product.availability]
- * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity]
- * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info]
+ * * Product.price_info google.cloud.retail.v2alpha.Product.price_info
+ * * Product.availability google.cloud.retail.v2alpha.Product.availability
+ * * Product.available_quantity google.cloud.retail.v2alpha.Product.available_quantity
+ * * Product.fulfillment_info google.cloud.retail.v2alpha.Product.fulfillment_info
* If a full overwrite of inventory information while ignoring timestamps is
- * needed, [UpdateProduct][] should be invoked instead.
+ * needed, UpdateProduct should be invoked instead.
*/
- // const inventory = ''
+ // const inventory = {}
/**
* Indicates which inventory fields in the provided
- * [Product][google.cloud.retail.v2alpha.Product] to update. If not set or set
+ * Product google.cloud.retail.v2alpha.Product to update. If not set or set
* with empty paths, all inventory fields will be updated.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned and the entire update will be ignored.
*/
- // const setMask = ''
+ // const setMask = {}
/**
* The time when the request is issued, used to prevent
* out-of-order updates on inventory fields with the last update time
* recorded. If not provided, the internal system time will be used.
*/
- // const setTime = ''
+ // const setTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2alpha.Product] with
- * name [Product.name][google.cloud.retail.v2alpha.Product.name] is not found,
+ * If set to true, and the Product google.cloud.retail.v2alpha.Product with
+ * name Product.name google.cloud.retail.v2alpha.Product.name is not found,
* the inventory update will still be processed and retained for at most 1 day
- * until the [Product][google.cloud.retail.v2alpha.Product] is created. If set
+ * until the Product google.cloud.retail.v2alpha.Product is created. If set
* to false, a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2alpha.Product] is not found.
+ * Product google.cloud.retail.v2alpha.Product is not found.
*/
// const allowMissing = true
@@ -81,7 +81,7 @@ function main(inventory) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function setInventory() {
+ async function callSetInventory() {
// Construct request
const request = {
inventory,
@@ -93,7 +93,7 @@ function main(inventory) {
console.log(response);
}
- setInventory();
+ callSetInventory();
// [END retail_v2alpha_generated_ProductService_SetInventory_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js
index f664194a142..078d4fbdfec 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js
@@ -22,26 +22,26 @@ function main(product) {
/**
* Required. The product to update/create.
* If the caller does not have permission to update the
- * [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
+ * Product google.cloud.retail.v2alpha.Product, regardless of whether or
* not it exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2alpha.Product] to update does not
+ * If the Product google.cloud.retail.v2alpha.Product to update does not
* exist and
- * [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
+ * allow_missing google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing
* is not set, a NOT_FOUND error is returned.
*/
- // const product = ''
+ // const product = {}
/**
* Indicates which fields in the provided
- * [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
+ * Product google.cloud.retail.v2alpha.Product to update. The immutable and
* output only fields are NOT supported. If not set, all supported fields (the
* fields that are neither immutable nor output only) are updated.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const updateMask = ''
+ // const updateMask = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
- * not found, a new [Product][google.cloud.retail.v2alpha.Product] will be
+ * If set to true, and the Product google.cloud.retail.v2alpha.Product is
+ * not found, a new Product google.cloud.retail.v2alpha.Product will be
* created. In this situation, `update_mask` is ignored.
*/
// const allowMissing = true
@@ -52,7 +52,7 @@ function main(product) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function updateProduct() {
+ async function callUpdateProduct() {
// Construct request
const request = {
product,
@@ -63,7 +63,7 @@ function main(product) {
console.log(response);
}
- updateProduct();
+ callUpdateProduct();
// [END retail_v2alpha_generated_ProductService_UpdateProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js b/packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js
index 86b868c6a31..8f0b00c1c9c 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js
@@ -49,9 +49,9 @@ function main(placement, visitorId) {
/**
* User information.
*/
- // const userInfo = ''
+ // const userInfo = {}
/**
- * Maximum number of [Product][google.cloud.retail.v2alpha.Product]s to
+ * Maximum number of Product google.cloud.retail.v2alpha.Product s to
* return. If unspecified, defaults to a reasonable value. The maximum allowed
* value is 120. Values above 120 will be coerced to 120.
* If this field is negative, an INVALID_ARGUMENT is returned.
@@ -59,12 +59,12 @@ function main(placement, visitorId) {
// const pageSize = 1234
/**
* A page token
- * [SearchResponse.next_page_token][google.cloud.retail.v2alpha.SearchResponse.next_page_token],
+ * SearchResponse.next_page_token google.cloud.retail.v2alpha.SearchResponse.next_page_token,
* received from a previous
- * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
+ * SearchService.Search google.cloud.retail.v2alpha.SearchService.Search
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
+ * SearchService.Search google.cloud.retail.v2alpha.SearchService.Search
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
@@ -72,9 +72,9 @@ function main(placement, visitorId) {
/**
* A 0-indexed integer that specifies the current offset (that is, starting
* result location, amongst the
- * [Product][google.cloud.retail.v2alpha.Product]s deemed by the API as
+ * Product google.cloud.retail.v2alpha.Product s deemed by the API as
* relevant) in search results. This field is only considered if
- * [page_token][google.cloud.retail.v2alpha.SearchRequest.page_token] is
+ * page_token google.cloud.retail.v2alpha.SearchRequest.page_token is
* unset.
* If this field is negative, an INVALID_ARGUMENT is returned.
*/
@@ -82,8 +82,8 @@ function main(placement, visitorId) {
/**
* The filter syntax consists of an expression language for constructing a
* predicate from one or more fields of the products being filtered. Filter
- * expression is case-sensitive. See more details at this [user
- * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+ * expression is case-sensitive. See more details at this user
+ * guide (https://cloud.google.com/retail/docs/filter-and-order#filter).
* If this field is unrecognizable, an INVALID_ARGUMENT is returned.
*/
// const filter = 'abc123'
@@ -91,20 +91,20 @@ function main(placement, visitorId) {
* The filter applied to every search request when quality improvement such as
* query expansion is needed. For example, if a query does not have enough
* results, an expanded query with
- * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter]
+ * SearchRequest.canonical_filter google.cloud.retail.v2alpha.SearchRequest.canonical_filter
* will be returned as a supplement of the original query. This field is
* strongly recommended to achieve high search quality.
* See
- * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
+ * SearchRequest.filter google.cloud.retail.v2alpha.SearchRequest.filter
* for more details about filter syntax.
*/
// const canonicalFilter = 'abc123'
/**
* The order in which products are returned. Products can be ordered by
- * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
+ * a field in an Product google.cloud.retail.v2alpha.Product object. Leave
* it unset if ordered by relevance. OrderBy expression is case-sensitive. See
- * more details at this [user
- * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+ * more details at this user
+ * guide (https://cloud.google.com/retail/docs/filter-and-order#order).
* If this field is unrecognizable, an INVALID_ARGUMENT is returned.
*/
// const orderBy = 'abc123'
@@ -120,45 +120,45 @@ function main(placement, visitorId) {
* This feature requires additional allowlisting. Contact Retail Search
* support team if you are interested in using dynamic facet feature.
*/
- // const dynamicFacetSpec = ''
+ // const dynamicFacetSpec = {}
/**
* Boost specification to boost certain products. See more details at this
- * [user guide](https://cloud.google.com/retail/docs/boosting).
+ * user guide (https://cloud.google.com/retail/docs/boosting).
* Notice that if both
- * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
- * and [SearchRequest.boost_spec] are set, the boost conditions from both
+ * ServingConfig.boost_control_ids google.cloud.retail.v2alpha.ServingConfig.boost_control_ids
+ * and SearchRequest.boost_spec are set, the boost conditions from both
* places are evaluated. If a search request matches multiple boost
* conditions, the final boost score is equal to the sum of the boost scores
* from all matched boost conditions.
*/
- // const boostSpec = ''
+ // const boostSpec = {}
/**
* The query expansion specification that specifies the conditions under which
- * query expansion will occur. See more details at this [user
- * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+ * query expansion will occur. See more details at this user
+ * guide (https://cloud.google.com/retail/docs/result-size#query_expansion).
*/
- // const queryExpansionSpec = ''
+ // const queryExpansionSpec = {}
/**
* The relevance threshold of the search results.
* Defaults to
- * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH],
+ * RelevanceThreshold.HIGH google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH,
* which means only the most relevant results are shown, and the least number
- * of results are returned. See more details at this [user
- * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding).
+ * of results are returned. See more details at this user
+ * guide (https://cloud.google.com/retail/docs/result-size#relevance_thresholding).
*/
- // const relevanceThreshold = ''
+ // const relevanceThreshold = {}
/**
* The keys to fetch and rollup the matching
- * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2alpha.Product]s attributes. The attributes
+ * variant google.cloud.retail.v2alpha.Product.Type.VARIANT
+ * Product google.cloud.retail.v2alpha.Product s attributes. The attributes
* from all the matching
- * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2alpha.Product]s are merged and
+ * variant google.cloud.retail.v2alpha.Product.Type.VARIANT
+ * Product google.cloud.retail.v2alpha.Product s are merged and
* de-duplicated. Notice that rollup
- * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2alpha.Product]s attributes will lead to
+ * variant google.cloud.retail.v2alpha.Product.Type.VARIANT
+ * Product google.cloud.retail.v2alpha.Product s attributes will lead to
* extra query latency. Maximum number of keys is 10.
- * For [FulfillmentInfo][google.cloud.retail.v2alpha.FulfillmentInfo], a
+ * For FulfillmentInfo google.cloud.retail.v2alpha.FulfillmentInfo, a
* fulfillment type and a fulfillment ID must be provided in the format of
* "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
* "pickupInStore" is fulfillment type and "store123" is the store ID.
@@ -169,51 +169,51 @@ function main(placement, visitorId) {
* * discount
* * inventory(place_id,price)
* * attributes.key, where key is any key in the
- * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map.
+ * Product.attributes google.cloud.retail.v2alpha.Product.attributes map.
* * pickupInStore.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "pickup-in-store".
* * shipToStore.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "ship-to-store".
* * sameDayDelivery.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "same-day-delivery".
* * nextDayDelivery.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "next-day-delivery".
* * customFulfillment1.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "custom-type-1".
* * customFulfillment2.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "custom-type-2".
* * customFulfillment3.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "custom-type-3".
* * customFulfillment4.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "custom-type-4".
* * customFulfillment5.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2alpha.FulfillmentInfo.place_ids
* for
- * [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
+ * FulfillmentInfo.type google.cloud.retail.v2alpha.FulfillmentInfo.type
* "custom-type-5".
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
@@ -223,20 +223,20 @@ function main(placement, visitorId) {
* The categories associated with a category page. Required for category
* navigation queries to achieve good search quality. The format should be
* the same as
- * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+ * UserEvent.page_categories google.cloud.retail.v2alpha.UserEvent.page_categories;
* To represent full path of category, use '>' sign to separate different
* hierarchies. If '>' is part of the category name, please replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
- * "pageCategories" : ["Sales > 2017 Black Friday Deals"].
+ * "pageCategories" : "Sales > 2017 Black Friday Deals".
*/
// const pageCategories = 'abc123'
/**
* The search mode of the search request. If not specified, a single search
* request triggers both product search and faceted search.
*/
- // const searchMode = ''
+ // const searchMode = {}
// Imports the Retail library
const {SearchServiceClient} = require('@google-cloud/retail').v2alpha;
@@ -244,7 +244,7 @@ function main(placement, visitorId) {
// Instantiates a client
const retailClient = new SearchServiceClient();
- async function search() {
+ async function callSearch() {
// Construct request
const request = {
placement,
@@ -258,7 +258,7 @@ function main(placement, visitorId) {
}
}
- search();
+ callSearch();
// [END retail_v2alpha_generated_SearchService_Search_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js
index 4018281ea61..4807eb3932b 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js
@@ -49,7 +49,7 @@ function main(parent, userEvent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function collectUserEvent() {
+ async function callCollectUserEvent() {
// Construct request
const request = {
parent,
@@ -61,7 +61,7 @@ function main(parent, userEvent) {
console.log(response);
}
- collectUserEvent();
+ callCollectUserEvent();
// [END retail_v2alpha_generated_UserEventService_CollectUserEvent_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js
index c4cb06a8cf6..525442bc449 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js
@@ -26,12 +26,12 @@ function main(parent, inputConfig) {
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* The desired location of errors incurred during the Import. Cannot be set
* for inline user event imports.
*/
- // const errorsConfig = ''
+ // const errorsConfig = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2alpha;
@@ -39,7 +39,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function importUserEvents() {
+ async function callImportUserEvents() {
// Construct request
const request = {
parent,
@@ -52,7 +52,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importUserEvents();
+ callImportUserEvents();
// [END retail_v2alpha_generated_UserEventService_ImportUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js
index 5f8e511683d..9d8540c7da3 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js
@@ -30,7 +30,7 @@ function main(parent, filter) {
* length limit of 5,000 characters. Empty string filter is not allowed. The
* eligible fields for filtering are:
* * `eventType`: Double quoted
- * [UserEvent.event_type][google.cloud.retail.v2alpha.UserEvent.event_type]
+ * UserEvent.event_type google.cloud.retail.v2alpha.UserEvent.event_type
* string.
* * `eventTime`: in ISO 8601 "zulu" format.
* * `visitorId`: Double quoted string. Specifying this will delete all
@@ -61,7 +61,7 @@ function main(parent, filter) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function purgeUserEvents() {
+ async function callPurgeUserEvents() {
// Construct request
const request = {
parent,
@@ -74,7 +74,7 @@ function main(parent, filter) {
console.log(response);
}
- purgeUserEvents();
+ callPurgeUserEvents();
// [END retail_v2alpha_generated_UserEventService_PurgeUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js
index efbb58e2488..0a5997bdac0 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js
@@ -30,7 +30,7 @@ function main(parent) {
* USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
* invalid integer value.
*/
- // const userEventRejoinScope = ''
+ // const userEventRejoinScope = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2alpha;
@@ -38,7 +38,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function rejoinUserEvents() {
+ async function callRejoinUserEvents() {
// Construct request
const request = {
parent,
@@ -50,7 +50,7 @@ function main(parent) {
console.log(response);
}
- rejoinUserEvents();
+ callRejoinUserEvents();
// [END retail_v2alpha_generated_UserEventService_RejoinUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js
index be821f78f1f..3b8ccb24025 100644
--- a/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js
+++ b/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js
@@ -27,7 +27,7 @@ function main(parent, userEvent) {
/**
* Required. User event to write.
*/
- // const userEvent = ''
+ // const userEvent = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2alpha;
@@ -35,7 +35,7 @@ function main(parent, userEvent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function writeUserEvent() {
+ async function callWriteUserEvent() {
// Construct request
const request = {
parent,
@@ -47,7 +47,7 @@ function main(parent, userEvent) {
console.log(response);
}
- writeUserEvent();
+ callWriteUserEvent();
// [END retail_v2alpha_generated_UserEventService_WriteUserEvent_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js
index 5f5f443d8f0..10918a1e3b0 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js
@@ -31,7 +31,7 @@ function main() {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function getDefaultBranch() {
+ async function callGetDefaultBranch() {
// Construct request
const request = {};
@@ -40,7 +40,7 @@ function main() {
console.log(response);
}
- getDefaultBranch();
+ callGetDefaultBranch();
// [END retail_v2beta_generated_CatalogService_GetDefaultBranch_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js
index 0bfd55246a7..eb58e87a52a 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js
@@ -22,13 +22,13 @@ function main(parent) {
/**
* Required. The account resource name with an associated location.
* If the caller does not have permission to list
- * [Catalog][google.cloud.retail.v2beta.Catalog]s under this location,
+ * Catalog google.cloud.retail.v2beta.Catalog s under this location,
* regardless of whether or not this location exists, a PERMISSION_DENIED
* error is returned.
*/
// const parent = 'abc123'
/**
- * Maximum number of [Catalog][google.cloud.retail.v2beta.Catalog]s to return.
+ * Maximum number of Catalog google.cloud.retail.v2beta.Catalog s to return.
* If unspecified, defaults to 50. The maximum allowed value is 1000. Values
* above 1000 will be coerced to 1000.
* If this field is negative, an INVALID_ARGUMENT is returned.
@@ -36,12 +36,12 @@ function main(parent) {
// const pageSize = 1234
/**
* A page token
- * [ListCatalogsResponse.next_page_token][google.cloud.retail.v2beta.ListCatalogsResponse.next_page_token],
+ * ListCatalogsResponse.next_page_token google.cloud.retail.v2beta.ListCatalogsResponse.next_page_token,
* received from a previous
- * [CatalogService.ListCatalogs][google.cloud.retail.v2beta.CatalogService.ListCatalogs]
+ * CatalogService.ListCatalogs google.cloud.retail.v2beta.CatalogService.ListCatalogs
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [CatalogService.ListCatalogs][google.cloud.retail.v2beta.CatalogService.ListCatalogs]
+ * CatalogService.ListCatalogs google.cloud.retail.v2beta.CatalogService.ListCatalogs
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
@@ -53,7 +53,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function listCatalogs() {
+ async function callListCatalogs() {
// Construct request
const request = {
parent,
@@ -66,7 +66,7 @@ function main(parent) {
}
}
- listCatalogs();
+ callListCatalogs();
// [END retail_v2beta_generated_CatalogService_ListCatalogs_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js
index 1baa77407e3..be8bc09a380 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js
@@ -32,7 +32,7 @@ function main() {
// const branchId = 'abc123'
/**
* Some note on this request, this can be retrieved by
- * [CatalogService.GetDefaultBranch][google.cloud.retail.v2beta.CatalogService.GetDefaultBranch]
+ * CatalogService.GetDefaultBranch google.cloud.retail.v2beta.CatalogService.GetDefaultBranch
* before next valid default branch set occurs.
* This field must be a UTF-8 encoded string with a length limit of 1,000
* characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -45,7 +45,7 @@ function main() {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function setDefaultBranch() {
+ async function callSetDefaultBranch() {
// Construct request
const request = {};
@@ -54,7 +54,7 @@ function main() {
console.log(response);
}
- setDefaultBranch();
+ callSetDefaultBranch();
// [END retail_v2beta_generated_CatalogService_SetDefaultBranch_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js
index 8dbc583396e..73cc1451a66 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js
@@ -20,21 +20,21 @@ function main(catalog) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
- * Required. The [Catalog][google.cloud.retail.v2beta.Catalog] to update.
+ * Required. The Catalog google.cloud.retail.v2beta.Catalog to update.
* If the caller does not have permission to update the
- * [Catalog][google.cloud.retail.v2beta.Catalog], regardless of whether or not
+ * Catalog google.cloud.retail.v2beta.Catalog, regardless of whether or not
* it exists, a PERMISSION_DENIED error is returned.
- * If the [Catalog][google.cloud.retail.v2beta.Catalog] to update does not
+ * If the Catalog google.cloud.retail.v2beta.Catalog to update does not
* exist, a NOT_FOUND error is returned.
*/
- // const catalog = ''
+ // const catalog = {}
/**
* Indicates which fields in the provided
- * [Catalog][google.cloud.retail.v2beta.Catalog] to update.
+ * Catalog google.cloud.retail.v2beta.Catalog to update.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const updateMask = ''
+ // const updateMask = {}
// Imports the Retail library
const {CatalogServiceClient} = require('@google-cloud/retail').v2beta;
@@ -42,7 +42,7 @@ function main(catalog) {
// Instantiates a client
const retailClient = new CatalogServiceClient();
- async function updateCatalog() {
+ async function callUpdateCatalog() {
// Construct request
const request = {
catalog,
@@ -53,7 +53,7 @@ function main(catalog) {
console.log(response);
}
- updateCatalog();
+ callUpdateCatalog();
// [END retail_v2beta_generated_CatalogService_UpdateCatalog_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js b/packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js
index d38e3d77ca8..c992ee208ef 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js
@@ -43,7 +43,7 @@ function main(catalog, query) {
* The list of languages of the query. This is
* the BCP-47 language code, such as "en-US" or "sr-Latn".
* For more information, see
- * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+ * Tags for Identifying Languages (https://tools.ietf.org/html/bcp47).
* The maximum number of allowed characters is 255.
* Only "en-US" is currently supported.
*/
@@ -63,7 +63,7 @@ function main(catalog, query) {
/**
* Determines which dataset to use for fetching completion. "user-data" will
* use the imported dataset through
- * [CompletionService.ImportCompletionData][google.cloud.retail.v2beta.CompletionService.ImportCompletionData].
+ * CompletionService.ImportCompletionData google.cloud.retail.v2beta.CompletionService.ImportCompletionData.
* "cloud-retail" will use the dataset generated by cloud retail based on user
* events. If leave empty, it will use the "user-data".
* Current supported values:
@@ -75,7 +75,7 @@ function main(catalog, query) {
// const dataset = 'abc123'
/**
* Completion max suggestions. If left unset or set to 0, then will fallback
- * to the configured value [CompletionConfig.max_suggestions][].
+ * to the configured value CompletionConfig.max_suggestions .
* The maximum allowed max suggestions is 20. If it is set higher, it will be
* capped by 20.
*/
@@ -87,7 +87,7 @@ function main(catalog, query) {
// Instantiates a client
const retailClient = new CompletionServiceClient();
- async function completeQuery() {
+ async function callCompleteQuery() {
// Construct request
const request = {
catalog,
@@ -99,7 +99,7 @@ function main(catalog, query) {
console.log(response);
}
- completeQuery();
+ callCompleteQuery();
// [END retail_v2beta_generated_CompletionService_CompleteQuery_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js b/packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js
index 77c065541de..2b3d4297fb2 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js
@@ -27,12 +27,12 @@ function main(parent, inputConfig) {
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* Pub/Sub topic for receiving notification. If this field is set,
* when the import is finished, a notification will be sent to
* specified Pub/Sub topic. The message data will be JSON string of a
- * [Operation][google.longrunning.Operation].
+ * Operation google.longrunning.Operation.
* Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
*/
// const notificationPubsubTopic = 'abc123'
@@ -43,7 +43,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new CompletionServiceClient();
- async function importCompletionData() {
+ async function callImportCompletionData() {
// Construct request
const request = {
parent,
@@ -56,7 +56,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importCompletionData();
+ callImportCompletionData();
// [END retail_v2beta_generated_CompletionService_ImportCompletionData_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js b/packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js
index e01ce1ff98d..b9fdab6115a 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js
@@ -24,8 +24,8 @@ function main(placement, userEvent) {
* {name=projects/* /locations/global/catalogs/default_catalog/placements/*}
* The ID of the Recommendations AI placement. Before you can request
* predictions from your model, you must create at least one placement for it.
- * For more information, see [Managing
- * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
+ * For more information, see Managing
+ * placements (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
* The full list of available placements can be seen at
* https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
*/
@@ -36,7 +36,7 @@ function main(placement, userEvent) {
* won't be ingested to userEvent logs. Thus, a separate userEvent write
* request is required for event logging.
*/
- // const userEvent = ''
+ // const userEvent = {}
/**
* Maximum number of results to return per page. Set this property
* to the number of prediction results needed. If zero, the service will
@@ -117,8 +117,8 @@ function main(placement, userEvent) {
* * The key portion of a label must be unique. However, you can use the same
* key with multiple resources.
* * Keys must start with a lowercase letter or international character.
- * See [Google Cloud
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+ * See Google Cloud
+ * Document (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
* for more details.
*/
// const labels = 1234
@@ -129,7 +129,7 @@ function main(placement, userEvent) {
// Instantiates a client
const retailClient = new PredictionServiceClient();
- async function predict() {
+ async function callPredict() {
// Construct request
const request = {
placement,
@@ -141,7 +141,7 @@ function main(placement, userEvent) {
console.log(response);
}
- predict();
+ callPredict();
// [END retail_v2beta_generated_PredictionService_Predict_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js
index ed21e64f9d4..7ebff9f7383 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js
@@ -21,10 +21,10 @@ function main(product, type, placeIds) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2beta.Product], such as
+ * Product google.cloud.retail.v2beta.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2beta.Product], regardless of whether or not
+ * Product google.cloud.retail.v2beta.Product, regardless of whether or not
* it exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -43,22 +43,22 @@ function main(product, type, placeIds) {
* * "custom-type-5"
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
- * This field directly corresponds to [Product.fulfillment_info.type][].
+ * This field directly corresponds to Product.fulfillment_info.type .
*/
// const type = 'abc123'
/**
* Required. The IDs for this
- * [type][google.cloud.retail.v2beta.AddFulfillmentPlacesRequest.type], such
+ * type google.cloud.retail.v2beta.AddFulfillmentPlacesRequest.type, such
* as the store IDs for "pickup-in-store" or the region IDs for
* "same-day-delivery" to be added for this
- * [type][google.cloud.retail.v2beta.AddFulfillmentPlacesRequest.type].
+ * type google.cloud.retail.v2beta.AddFulfillmentPlacesRequest.type.
* Duplicate IDs will be automatically ignored.
* At least 1 value is required, and a maximum of 2000 values are allowed.
* Each value must be a string with a length limit of 10 characters, matching
* the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
* INVALID_ARGUMENT error is returned.
* If the total number of place IDs exceeds 2000 for this
- * [type][google.cloud.retail.v2beta.AddFulfillmentPlacesRequest.type] after
+ * type google.cloud.retail.v2beta.AddFulfillmentPlacesRequest.type after
* adding, then the update will be rejected.
*/
// const placeIds = 'abc123'
@@ -67,14 +67,14 @@ function main(product, type, placeIds) {
* out-of-order updates on fulfillment information. If not provided, the
* internal system time will be used.
*/
- // const addTime = ''
+ // const addTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2beta.Product] is
+ * If set to true, and the Product google.cloud.retail.v2beta.Product is
* not found, the fulfillment information will still be processed and retained
* for at most 1 day and processed once the
- * [Product][google.cloud.retail.v2beta.Product] is created. If set to false,
+ * Product google.cloud.retail.v2beta.Product is created. If set to false,
* a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2beta.Product] is not found.
+ * Product google.cloud.retail.v2beta.Product is not found.
*/
// const allowMissing = true
@@ -84,7 +84,7 @@ function main(product, type, placeIds) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function addFulfillmentPlaces() {
+ async function callAddFulfillmentPlaces() {
// Construct request
const request = {
product,
@@ -98,7 +98,7 @@ function main(product, type, placeIds) {
console.log(response);
}
- addFulfillmentPlaces();
+ callAddFulfillmentPlaces();
// [END retail_v2beta_generated_ProductService_AddFulfillmentPlaces_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js
index 344487c9e79..99b3712c648 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js
@@ -25,19 +25,19 @@ function main(parent, product, productId) {
*/
// const parent = 'abc123'
/**
- * Required. The [Product][google.cloud.retail.v2beta.Product] to create.
+ * Required. The Product google.cloud.retail.v2beta.Product to create.
*/
- // const product = ''
+ // const product = {}
/**
* Required. The ID to use for the
- * [Product][google.cloud.retail.v2beta.Product], which will become the final
- * component of the [Product.name][google.cloud.retail.v2beta.Product.name].
+ * Product google.cloud.retail.v2beta.Product, which will become the final
+ * component of the Product.name google.cloud.retail.v2beta.Product.name.
* If the caller does not have permission to create the
- * [Product][google.cloud.retail.v2beta.Product], regardless of whether or not
+ * Product google.cloud.retail.v2beta.Product, regardless of whether or not
* it exists, a PERMISSION_DENIED error is returned.
* This field must be unique among all
- * [Product][google.cloud.retail.v2beta.Product]s with the same
- * [parent][google.cloud.retail.v2beta.CreateProductRequest.parent].
+ * Product google.cloud.retail.v2beta.Product s with the same
+ * parent google.cloud.retail.v2beta.CreateProductRequest.parent.
* Otherwise, an ALREADY_EXISTS error is returned.
* This field must be a UTF-8 encoded string with a length limit of 128
* characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -50,7 +50,7 @@ function main(parent, product, productId) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function createProduct() {
+ async function callCreateProduct() {
// Construct request
const request = {
parent,
@@ -63,7 +63,7 @@ function main(parent, product, productId) {
console.log(response);
}
- createProduct();
+ callCreateProduct();
// [END retail_v2beta_generated_ProductService_CreateProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js
index ef63e363bbc..8198869cd66 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js
@@ -21,23 +21,23 @@ function main(name) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2beta.Product], such as
+ * Product google.cloud.retail.v2beta.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to delete the
- * [Product][google.cloud.retail.v2beta.Product], regardless of whether or not
+ * Product google.cloud.retail.v2beta.Product, regardless of whether or not
* it exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2beta.Product] to delete does not
+ * If the Product google.cloud.retail.v2beta.Product to delete does not
* exist, a NOT_FOUND error is returned.
- * The [Product][google.cloud.retail.v2beta.Product] to delete can neither be
+ * The Product google.cloud.retail.v2beta.Product to delete can neither be
* a
- * [Product.Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2beta.Product] member nor a
- * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2beta.Product] with more than one
- * [variants][google.cloud.retail.v2beta.Product.Type.VARIANT]. Otherwise, an
+ * Product.Type.COLLECTION google.cloud.retail.v2beta.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2beta.Product member nor a
+ * Product.Type.PRIMARY google.cloud.retail.v2beta.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2beta.Product with more than one
+ * variants google.cloud.retail.v2beta.Product.Type.VARIANT. Otherwise, an
* INVALID_ARGUMENT error is returned.
* All inventory information for the named
- * [Product][google.cloud.retail.v2beta.Product] will be deleted.
+ * Product google.cloud.retail.v2beta.Product will be deleted.
*/
// const name = 'abc123'
@@ -47,7 +47,7 @@ function main(name) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function deleteProduct() {
+ async function callDeleteProduct() {
// Construct request
const request = {
name,
@@ -58,7 +58,7 @@ function main(name) {
console.log(response);
}
- deleteProduct();
+ callDeleteProduct();
// [END retail_v2beta_generated_ProductService_DeleteProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js
index 20007ea8bc4..a36cae42916 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js
@@ -21,12 +21,12 @@ function main(name) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2beta.Product], such as
+ * Product google.cloud.retail.v2beta.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2beta.Product], regardless of whether or not
+ * Product google.cloud.retail.v2beta.Product, regardless of whether or not
* it exists, a PERMISSION_DENIED error is returned.
- * If the requested [Product][google.cloud.retail.v2beta.Product] does not
+ * If the requested Product google.cloud.retail.v2beta.Product does not
* exist, a NOT_FOUND error is returned.
*/
// const name = 'abc123'
@@ -37,7 +37,7 @@ function main(name) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function getProduct() {
+ async function callGetProduct() {
// Construct request
const request = {
name,
@@ -48,7 +48,7 @@ function main(name) {
console.log(response);
}
- getProduct();
+ callGetProduct();
// [END retail_v2beta_generated_ProductService_GetProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js
index 37975519eae..7db5f12367c 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js
@@ -31,39 +31,39 @@ function main(parent, inputConfig) {
* dataset scope. Ensures idempotency and used for request deduplication.
* Server-generated if unspecified. Up to 128 characters long and must match
* the pattern: `[a-zA-Z0-9_]+`. This is returned as [Operation.name][] in
- * [ImportMetadata][google.cloud.retail.v2beta.ImportMetadata].
+ * ImportMetadata google.cloud.retail.v2beta.ImportMetadata.
* Only supported when
- * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
+ * ImportProductsRequest.reconciliation_mode google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode
* is set to `FULL`.
*/
// const requestId = 'abc123'
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* The desired location of errors incurred during the Import.
*/
- // const errorsConfig = ''
+ // const errorsConfig = {}
/**
* Indicates which fields in the provided imported 'products' to update. If
* not set, will by default update all fields.
*/
- // const updateMask = ''
+ // const updateMask = {}
/**
* The mode of reconciliation between existing products and the products to be
* imported. Defaults to
- * [ReconciliationMode.INCREMENTAL][google.cloud.retail.v2beta.ImportProductsRequest.ReconciliationMode.INCREMENTAL].
+ * ReconciliationMode.INCREMENTAL google.cloud.retail.v2beta.ImportProductsRequest.ReconciliationMode.INCREMENTAL.
*/
- // const reconciliationMode = ''
+ // const reconciliationMode = {}
/**
* Pub/Sub topic for receiving notification. If this field is set,
* when the import is finished, a notification will be sent to
* specified Pub/Sub topic. The message data will be JSON string of a
- * [Operation][google.longrunning.Operation].
+ * Operation google.longrunning.Operation.
* Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
* Only supported when
- * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
+ * ImportProductsRequest.reconciliation_mode google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode
* is set to `FULL`.
*/
// const notificationPubsubTopic = 'abc123'
@@ -74,7 +74,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function importProducts() {
+ async function callImportProducts() {
// Construct request
const request = {
parent,
@@ -87,7 +87,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importProducts();
+ callImportProducts();
// [END retail_v2beta_generated_ProductService_ImportProducts_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js
index 29393fe37a6..5b770e84942 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js
@@ -25,13 +25,13 @@ function main(parent) {
* `default_branch` as the branch ID, to list products under the default
* branch.
* If the caller does not have permission to list
- * [Product][google.cloud.retail.v2beta.Product]s under this branch,
+ * Product google.cloud.retail.v2beta.Product s under this branch,
* regardless of whether or not this branch exists, a PERMISSION_DENIED error
* is returned.
*/
// const parent = 'abc123'
/**
- * Maximum number of [Product][google.cloud.retail.v2beta.Product]s to return.
+ * Maximum number of Product google.cloud.retail.v2beta.Product s to return.
* If unspecified, defaults to 100. The maximum allowed value is 1000. Values
* above 1000 will be coerced to 1000.
* If this field is negative, an INVALID_ARGUMENT error is returned.
@@ -39,12 +39,12 @@ function main(parent) {
// const pageSize = 1234
/**
* A page token
- * [ListProductsResponse.next_page_token][google.cloud.retail.v2beta.ListProductsResponse.next_page_token],
+ * ListProductsResponse.next_page_token google.cloud.retail.v2beta.ListProductsResponse.next_page_token,
* received from a previous
- * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]
+ * ProductService.ListProducts google.cloud.retail.v2beta.ProductService.ListProducts
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]
+ * ProductService.ListProducts google.cloud.retail.v2beta.ProductService.ListProducts
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
@@ -52,49 +52,49 @@ function main(parent) {
/**
* A filter to apply on the list results. Supported features:
* * List all the products under the parent branch if
- * [filter][google.cloud.retail.v2beta.ListProductsRequest.filter] is unset.
+ * filter google.cloud.retail.v2beta.ListProductsRequest.filter is unset.
* * List
- * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2beta.Product]s sharing the same
- * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2beta.Product]. For example:
+ * Product.Type.VARIANT google.cloud.retail.v2beta.Product.Type.VARIANT
+ * Product google.cloud.retail.v2beta.Product s sharing the same
+ * Product.Type.PRIMARY google.cloud.retail.v2beta.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2beta.Product. For example:
* `primary_product_id = "some_product_id"`
- * * List [Product][google.cloud.retail.v2beta.Product]s bundled in a
- * [Product.Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2beta.Product].
+ * * List Product google.cloud.retail.v2beta.Product s bundled in a
+ * Product.Type.COLLECTION google.cloud.retail.v2beta.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2beta.Product.
* For example:
* `collection_product_id = "some_product_id"`
- * * List [Product][google.cloud.retail.v2beta.Product]s with a partibular
+ * * List Product google.cloud.retail.v2beta.Product s with a partibular
* type. For example:
* `type = "PRIMARY"`
* `type = "VARIANT"`
* `type = "COLLECTION"`
* If the field is unrecognizable, an INVALID_ARGUMENT error is returned.
* If the specified
- * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]
- * [Product][google.cloud.retail.v2beta.Product] or
- * [Product.Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]
- * [Product][google.cloud.retail.v2beta.Product] does not exist, a NOT_FOUND
+ * Product.Type.PRIMARY google.cloud.retail.v2beta.Product.Type.PRIMARY
+ * Product google.cloud.retail.v2beta.Product or
+ * Product.Type.COLLECTION google.cloud.retail.v2beta.Product.Type.COLLECTION
+ * Product google.cloud.retail.v2beta.Product does not exist, a NOT_FOUND
* error is returned.
*/
// const filter = 'abc123'
/**
- * The fields of [Product][google.cloud.retail.v2beta.Product] to return in
+ * The fields of Product google.cloud.retail.v2beta.Product to return in
* the responses. If not set or empty, the following fields are returned:
- * * [Product.name][google.cloud.retail.v2beta.Product.name]
- * * [Product.id][google.cloud.retail.v2beta.Product.id]
- * * [Product.title][google.cloud.retail.v2beta.Product.title]
- * * [Product.uri][google.cloud.retail.v2beta.Product.uri]
- * * [Product.images][google.cloud.retail.v2beta.Product.images]
- * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info]
- * * [Product.brands][google.cloud.retail.v2beta.Product.brands]
+ * * Product.name google.cloud.retail.v2beta.Product.name
+ * * Product.id google.cloud.retail.v2beta.Product.id
+ * * Product.title google.cloud.retail.v2beta.Product.title
+ * * Product.uri google.cloud.retail.v2beta.Product.uri
+ * * Product.images google.cloud.retail.v2beta.Product.images
+ * * Product.price_info google.cloud.retail.v2beta.Product.price_info
+ * * Product.brands google.cloud.retail.v2beta.Product.brands
* If "*" is provided, all fields are returned.
- * [Product.name][google.cloud.retail.v2beta.Product.name] is always returned
+ * Product.name google.cloud.retail.v2beta.Product.name is always returned
* no matter what mask is set.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const readMask = ''
+ // const readMask = {}
// Imports the Retail library
const {ProductServiceClient} = require('@google-cloud/retail').v2beta;
@@ -102,7 +102,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function listProducts() {
+ async function callListProducts() {
// Construct request
const request = {
parent,
@@ -115,7 +115,7 @@ function main(parent) {
}
}
- listProducts();
+ callListProducts();
// [END retail_v2beta_generated_ProductService_ListProducts_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js
index 853ef48ee34..12f13f6991b 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js
@@ -21,10 +21,10 @@ function main(product, type, placeIds) {
*/
/**
* Required. Full resource name of
- * [Product][google.cloud.retail.v2beta.Product], such as
+ * Product google.cloud.retail.v2beta.Product, such as
* `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
* If the caller does not have permission to access the
- * [Product][google.cloud.retail.v2beta.Product], regardless of whether or not
+ * Product google.cloud.retail.v2beta.Product, regardless of whether or not
* it exists, a PERMISSION_DENIED error is returned.
*/
// const product = 'abc123'
@@ -43,15 +43,15 @@ function main(product, type, placeIds) {
* * "custom-type-5"
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
- * This field directly corresponds to [Product.fulfillment_info.type][].
+ * This field directly corresponds to Product.fulfillment_info.type .
*/
// const type = 'abc123'
/**
* Required. The IDs for this
- * [type][google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest.type],
+ * type google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest.type,
* such as the store IDs for "pickup-in-store" or the region IDs for
* "same-day-delivery", to be removed for this
- * [type][google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest.type].
+ * type google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest.type.
* At least 1 value is required, and a maximum of 2000 values are allowed.
* Each value must be a string with a length limit of 10 characters, matching
* the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
@@ -63,14 +63,14 @@ function main(product, type, placeIds) {
* out-of-order updates on fulfillment information. If not provided, the
* internal system time will be used.
*/
- // const removeTime = ''
+ // const removeTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2beta.Product] is
+ * If set to true, and the Product google.cloud.retail.v2beta.Product is
* not found, the fulfillment information will still be processed and retained
* for at most 1 day and processed once the
- * [Product][google.cloud.retail.v2beta.Product] is created. If set to false,
+ * Product google.cloud.retail.v2beta.Product is created. If set to false,
* a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2beta.Product] is not found.
+ * Product google.cloud.retail.v2beta.Product is not found.
*/
// const allowMissing = true
@@ -80,7 +80,7 @@ function main(product, type, placeIds) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function removeFulfillmentPlaces() {
+ async function callRemoveFulfillmentPlaces() {
// Construct request
const request = {
product,
@@ -94,7 +94,7 @@ function main(product, type, placeIds) {
console.log(response);
}
- removeFulfillmentPlaces();
+ callRemoveFulfillmentPlaces();
// [END retail_v2beta_generated_ProductService_RemoveFulfillmentPlaces_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js
index ae2f590a188..fa4cfb98690 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js
@@ -22,56 +22,56 @@ function main(inventory) {
/**
* Required. The inventory information to update. The allowable fields to
* update are:
- * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info]
- * * [Product.availability][google.cloud.retail.v2beta.Product.availability]
- * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity]
- * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info]
+ * * Product.price_info google.cloud.retail.v2beta.Product.price_info
+ * * Product.availability google.cloud.retail.v2beta.Product.availability
+ * * Product.available_quantity google.cloud.retail.v2beta.Product.available_quantity
+ * * Product.fulfillment_info google.cloud.retail.v2beta.Product.fulfillment_info
* The updated inventory fields must be specified in
- * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask].
- * If [SetInventoryRequest.inventory.name][] is empty or invalid, an
+ * SetInventoryRequest.set_mask google.cloud.retail.v2beta.SetInventoryRequest.set_mask.
+ * If SetInventoryRequest.inventory.name is empty or invalid, an
* INVALID_ARGUMENT error is returned.
* If the caller does not have permission to update the
- * [Product][google.cloud.retail.v2beta.Product] named in
- * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of
+ * Product google.cloud.retail.v2beta.Product named in
+ * Product.name google.cloud.retail.v2beta.Product.name, regardless of
* whether or not it exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2beta.Product] to update does not
+ * If the Product google.cloud.retail.v2beta.Product to update does not
* have existing inventory information, the provided inventory information
* will be inserted.
- * If the [Product][google.cloud.retail.v2beta.Product] to update has existing
+ * If the Product google.cloud.retail.v2beta.Product to update has existing
* inventory information, the provided inventory information will be merged
* while respecting the last update time for each inventory field, using the
* provided or default value for
- * [SetInventoryRequest.set_time][google.cloud.retail.v2beta.SetInventoryRequest.set_time].
+ * SetInventoryRequest.set_time google.cloud.retail.v2beta.SetInventoryRequest.set_time.
* The last update time is recorded for the following inventory fields:
- * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info]
- * * [Product.availability][google.cloud.retail.v2beta.Product.availability]
- * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity]
- * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info]
+ * * Product.price_info google.cloud.retail.v2beta.Product.price_info
+ * * Product.availability google.cloud.retail.v2beta.Product.availability
+ * * Product.available_quantity google.cloud.retail.v2beta.Product.available_quantity
+ * * Product.fulfillment_info google.cloud.retail.v2beta.Product.fulfillment_info
* If a full overwrite of inventory information while ignoring timestamps is
- * needed, [UpdateProduct][] should be invoked instead.
+ * needed, UpdateProduct should be invoked instead.
*/
- // const inventory = ''
+ // const inventory = {}
/**
* Indicates which inventory fields in the provided
- * [Product][google.cloud.retail.v2beta.Product] to update. If not set or set
+ * Product google.cloud.retail.v2beta.Product to update. If not set or set
* with empty paths, all inventory fields will be updated.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned and the entire update will be ignored.
*/
- // const setMask = ''
+ // const setMask = {}
/**
* The time when the request is issued, used to prevent
* out-of-order updates on inventory fields with the last update time
* recorded. If not provided, the internal system time will be used.
*/
- // const setTime = ''
+ // const setTime = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2beta.Product] with
- * name [Product.name][google.cloud.retail.v2beta.Product.name] is not found,
+ * If set to true, and the Product google.cloud.retail.v2beta.Product with
+ * name Product.name google.cloud.retail.v2beta.Product.name is not found,
* the inventory update will still be processed and retained for at most 1 day
- * until the [Product][google.cloud.retail.v2beta.Product] is created. If set
+ * until the Product google.cloud.retail.v2beta.Product is created. If set
* to false, a NOT_FOUND error is returned if the
- * [Product][google.cloud.retail.v2beta.Product] is not found.
+ * Product google.cloud.retail.v2beta.Product is not found.
*/
// const allowMissing = true
@@ -81,7 +81,7 @@ function main(inventory) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function setInventory() {
+ async function callSetInventory() {
// Construct request
const request = {
inventory,
@@ -93,7 +93,7 @@ function main(inventory) {
console.log(response);
}
- setInventory();
+ callSetInventory();
// [END retail_v2beta_generated_ProductService_SetInventory_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js b/packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js
index fee1d168be5..112b4f4ff8d 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js
@@ -22,26 +22,26 @@ function main(product) {
/**
* Required. The product to update/create.
* If the caller does not have permission to update the
- * [Product][google.cloud.retail.v2beta.Product], regardless of whether or not
+ * Product google.cloud.retail.v2beta.Product, regardless of whether or not
* it exists, a PERMISSION_DENIED error is returned.
- * If the [Product][google.cloud.retail.v2beta.Product] to update does not
+ * If the Product google.cloud.retail.v2beta.Product to update does not
* exist and
- * [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
+ * allow_missing google.cloud.retail.v2beta.UpdateProductRequest.allow_missing
* is not set, a NOT_FOUND error is returned.
*/
- // const product = ''
+ // const product = {}
/**
* Indicates which fields in the provided
- * [Product][google.cloud.retail.v2beta.Product] to update. The immutable and
+ * Product google.cloud.retail.v2beta.Product to update. The immutable and
* output only fields are NOT supported. If not set, all supported fields (the
* fields that are neither immutable nor output only) are updated.
* If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
* is returned.
*/
- // const updateMask = ''
+ // const updateMask = {}
/**
- * If set to true, and the [Product][google.cloud.retail.v2beta.Product] is
- * not found, a new [Product][google.cloud.retail.v2beta.Product] will be
+ * If set to true, and the Product google.cloud.retail.v2beta.Product is
+ * not found, a new Product google.cloud.retail.v2beta.Product will be
* created. In this situation, `update_mask` is ignored.
*/
// const allowMissing = true
@@ -52,7 +52,7 @@ function main(product) {
// Instantiates a client
const retailClient = new ProductServiceClient();
- async function updateProduct() {
+ async function callUpdateProduct() {
// Construct request
const request = {
product,
@@ -63,7 +63,7 @@ function main(product) {
console.log(response);
}
- updateProduct();
+ callUpdateProduct();
// [END retail_v2beta_generated_ProductService_UpdateProduct_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js b/packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js
index 61f479313f8..b6cfbb95a5b 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js
@@ -49,9 +49,9 @@ function main(placement, visitorId) {
/**
* User information.
*/
- // const userInfo = ''
+ // const userInfo = {}
/**
- * Maximum number of [Product][google.cloud.retail.v2beta.Product]s to return.
+ * Maximum number of Product google.cloud.retail.v2beta.Product s to return.
* If unspecified, defaults to a reasonable value. The maximum allowed value
* is 120. Values above 120 will be coerced to 120.
* If this field is negative, an INVALID_ARGUMENT is returned.
@@ -59,30 +59,30 @@ function main(placement, visitorId) {
// const pageSize = 1234
/**
* A page token
- * [SearchResponse.next_page_token][google.cloud.retail.v2beta.SearchResponse.next_page_token],
+ * SearchResponse.next_page_token google.cloud.retail.v2beta.SearchResponse.next_page_token,
* received from a previous
- * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
+ * SearchService.Search google.cloud.retail.v2beta.SearchService.Search
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
- * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
+ * SearchService.Search google.cloud.retail.v2beta.SearchService.Search
* must match the call that provided the page token. Otherwise, an
* INVALID_ARGUMENT error is returned.
*/
// const pageToken = 'abc123'
/**
* A 0-indexed integer that specifies the current offset (that is, starting
- * result location, amongst the [Product][google.cloud.retail.v2beta.Product]s
+ * result location, amongst the Product google.cloud.retail.v2beta.Product s
* deemed by the API as relevant) in search results. This field is only
* considered if
- * [page_token][google.cloud.retail.v2beta.SearchRequest.page_token] is unset.
+ * page_token google.cloud.retail.v2beta.SearchRequest.page_token is unset.
* If this field is negative, an INVALID_ARGUMENT is returned.
*/
// const offset = 1234
/**
* The filter syntax consists of an expression language for constructing a
* predicate from one or more fields of the products being filtered. Filter
- * expression is case-sensitive. See more details at this [user
- * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+ * expression is case-sensitive. See more details at this user
+ * guide (https://cloud.google.com/retail/docs/filter-and-order#filter).
* If this field is unrecognizable, an INVALID_ARGUMENT is returned.
*/
// const filter = 'abc123'
@@ -90,19 +90,19 @@ function main(placement, visitorId) {
* The filter applied to every search request when quality improvement such as
* query expansion is needed. For example, if a query does not have enough
* results, an expanded query with
- * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter]
+ * SearchRequest.canonical_filter google.cloud.retail.v2beta.SearchRequest.canonical_filter
* will be returned as a supplement of the original query. This field is
* strongly recommended to achieve high search quality.
- * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
+ * See SearchRequest.filter google.cloud.retail.v2beta.SearchRequest.filter
* for more details about filter syntax.
*/
// const canonicalFilter = 'abc123'
/**
* The order in which products are returned. Products can be ordered by
- * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
+ * a field in an Product google.cloud.retail.v2beta.Product object. Leave
* it unset if ordered by relevance. OrderBy expression is case-sensitive. See
- * more details at this [user
- * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+ * more details at this user
+ * guide (https://cloud.google.com/retail/docs/filter-and-order#order).
* If this field is unrecognizable, an INVALID_ARGUMENT is returned.
*/
// const orderBy = 'abc123'
@@ -118,35 +118,35 @@ function main(placement, visitorId) {
* This feature requires additional allowlisting. Contact Retail Search
* support team if you are interested in using dynamic facet feature.
*/
- // const dynamicFacetSpec = ''
+ // const dynamicFacetSpec = {}
/**
* Boost specification to boost certain products. See more details at this
- * [user guide](https://cloud.google.com/retail/docs/boosting).
- * Notice that if both [ServingConfig.boost_control_ids][] and
- * [SearchRequest.boost_spec] are set, the boost conditions from both places
+ * user guide (https://cloud.google.com/retail/docs/boosting).
+ * Notice that if both ServingConfig.boost_control_ids and
+ * SearchRequest.boost_spec are set, the boost conditions from both places
* are evaluated. If a search request matches multiple boost conditions,
* the final boost score is equal to the sum of the boost scores from all
* matched boost conditions.
*/
- // const boostSpec = ''
+ // const boostSpec = {}
/**
* The query expansion specification that specifies the conditions under which
- * query expansion will occur. See more details at this [user
- * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+ * query expansion will occur. See more details at this user
+ * guide (https://cloud.google.com/retail/docs/result-size#query_expansion).
*/
- // const queryExpansionSpec = ''
+ // const queryExpansionSpec = {}
/**
* The keys to fetch and rollup the matching
- * [variant][google.cloud.retail.v2beta.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2beta.Product]s attributes. The attributes
+ * variant google.cloud.retail.v2beta.Product.Type.VARIANT
+ * Product google.cloud.retail.v2beta.Product s attributes. The attributes
* from all the matching
- * [variant][google.cloud.retail.v2beta.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2beta.Product]s are merged and
+ * variant google.cloud.retail.v2beta.Product.Type.VARIANT
+ * Product google.cloud.retail.v2beta.Product s are merged and
* de-duplicated. Notice that rollup
- * [variant][google.cloud.retail.v2beta.Product.Type.VARIANT]
- * [Product][google.cloud.retail.v2beta.Product]s attributes will lead to
+ * variant google.cloud.retail.v2beta.Product.Type.VARIANT
+ * Product google.cloud.retail.v2beta.Product s attributes will lead to
* extra query latency. Maximum number of keys is 10.
- * For [FulfillmentInfo][google.cloud.retail.v2beta.FulfillmentInfo], a
+ * For FulfillmentInfo google.cloud.retail.v2beta.FulfillmentInfo, a
* fulfillment type and a fulfillment ID must be provided in the format of
* "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
* "pickupInStore" is fulfillment type and "store123" is the store ID.
@@ -157,42 +157,42 @@ function main(placement, visitorId) {
* * discount
* * inventory(place_id,price)
* * attributes.key, where key is any key in the
- * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map.
+ * Product.attributes google.cloud.retail.v2beta.Product.attributes map.
* * pickupInStore.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "pickup-in-store".
* * shipToStore.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "ship-to-store".
* * sameDayDelivery.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "same-day-delivery".
* * nextDayDelivery.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "next-day-delivery".
* * customFulfillment1.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "custom-type-1".
* * customFulfillment2.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "custom-type-2".
* * customFulfillment3.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "custom-type-3".
* * customFulfillment4.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "custom-type-4".
* * customFulfillment5.id, where id is any
- * [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
- * for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
+ * FulfillmentInfo.place_ids google.cloud.retail.v2beta.FulfillmentInfo.place_ids
+ * for FulfillmentInfo.type google.cloud.retail.v2beta.FulfillmentInfo.type
* "custom-type-5".
* If this field is set to an invalid value other than these, an
* INVALID_ARGUMENT error is returned.
@@ -202,20 +202,20 @@ function main(placement, visitorId) {
* The categories associated with a category page. Required for category
* navigation queries to achieve good search quality. The format should be
* the same as
- * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+ * UserEvent.page_categories google.cloud.retail.v2beta.UserEvent.page_categories;
* To represent full path of category, use '>' sign to separate different
* hierarchies. If '>' is part of the category name, please replace it with
* other character(s).
* Category pages include special pages such as sales or promotions. For
* instance, a special sale page may have the category hierarchy:
- * "pageCategories" : ["Sales > 2017 Black Friday Deals"].
+ * "pageCategories" : "Sales > 2017 Black Friday Deals".
*/
// const pageCategories = 'abc123'
/**
* The search mode of the search request. If not specified, a single search
* request triggers both product search and faceted search.
*/
- // const searchMode = ''
+ // const searchMode = {}
// Imports the Retail library
const {SearchServiceClient} = require('@google-cloud/retail').v2beta;
@@ -223,7 +223,7 @@ function main(placement, visitorId) {
// Instantiates a client
const retailClient = new SearchServiceClient();
- async function search() {
+ async function callSearch() {
// Construct request
const request = {
placement,
@@ -237,7 +237,7 @@ function main(placement, visitorId) {
}
}
- search();
+ callSearch();
// [END retail_v2beta_generated_SearchService_Search_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js
index 14b0a36e874..5257ffc8738 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js
@@ -49,7 +49,7 @@ function main(parent, userEvent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function collectUserEvent() {
+ async function callCollectUserEvent() {
// Construct request
const request = {
parent,
@@ -61,7 +61,7 @@ function main(parent, userEvent) {
console.log(response);
}
- collectUserEvent();
+ callCollectUserEvent();
// [END retail_v2beta_generated_UserEventService_CollectUserEvent_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js
index d4dc2fc4959..e2b50f9541d 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js
@@ -26,12 +26,12 @@ function main(parent, inputConfig) {
/**
* Required. The desired input location of the data.
*/
- // const inputConfig = ''
+ // const inputConfig = {}
/**
* The desired location of errors incurred during the Import. Cannot be set
* for inline user event imports.
*/
- // const errorsConfig = ''
+ // const errorsConfig = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2beta;
@@ -39,7 +39,7 @@ function main(parent, inputConfig) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function importUserEvents() {
+ async function callImportUserEvents() {
// Construct request
const request = {
parent,
@@ -52,7 +52,7 @@ function main(parent, inputConfig) {
console.log(response);
}
- importUserEvents();
+ callImportUserEvents();
// [END retail_v2beta_generated_UserEventService_ImportUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js
index 39e6980933c..fefe0b66cee 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js
@@ -30,7 +30,7 @@ function main(parent, filter) {
* length limit of 5,000 characters. Empty string filter is not allowed. The
* eligible fields for filtering are:
* * `eventType`: Double quoted
- * [UserEvent.event_type][google.cloud.retail.v2beta.UserEvent.event_type]
+ * UserEvent.event_type google.cloud.retail.v2beta.UserEvent.event_type
* string.
* * `eventTime`: in ISO 8601 "zulu" format.
* * `visitorId`: Double quoted string. Specifying this will delete all
@@ -61,7 +61,7 @@ function main(parent, filter) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function purgeUserEvents() {
+ async function callPurgeUserEvents() {
// Construct request
const request = {
parent,
@@ -74,7 +74,7 @@ function main(parent, filter) {
console.log(response);
}
- purgeUserEvents();
+ callPurgeUserEvents();
// [END retail_v2beta_generated_UserEventService_PurgeUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js
index 2ac57d1b703..33eb3d5f6d3 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js
@@ -30,7 +30,7 @@ function main(parent) {
* USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
* invalid integer value.
*/
- // const userEventRejoinScope = ''
+ // const userEventRejoinScope = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2beta;
@@ -38,7 +38,7 @@ function main(parent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function rejoinUserEvents() {
+ async function callRejoinUserEvents() {
// Construct request
const request = {
parent,
@@ -50,7 +50,7 @@ function main(parent) {
console.log(response);
}
- rejoinUserEvents();
+ callRejoinUserEvents();
// [END retail_v2beta_generated_UserEventService_RejoinUserEvents_async]
}
diff --git a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js
index cc58e3a36b8..f1368ba57f2 100644
--- a/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js
+++ b/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js
@@ -27,7 +27,7 @@ function main(parent, userEvent) {
/**
* Required. User event to write.
*/
- // const userEvent = ''
+ // const userEvent = {}
// Imports the Retail library
const {UserEventServiceClient} = require('@google-cloud/retail').v2beta;
@@ -35,7 +35,7 @@ function main(parent, userEvent) {
// Instantiates a client
const retailClient = new UserEventServiceClient();
- async function writeUserEvent() {
+ async function callWriteUserEvent() {
// Construct request
const request = {
parent,
@@ -47,7 +47,7 @@ function main(parent, userEvent) {
console.log(response);
}
- writeUserEvent();
+ callWriteUserEvent();
// [END retail_v2beta_generated_UserEventService_WriteUserEvent_async]
}
diff --git a/packages/google-cloud-retail/src/v2/catalog_service_client.ts b/packages/google-cloud-retail/src/v2/catalog_service_client.ts
index 80dfc46ce11..16ee045dc50 100644
--- a/packages/google-cloud-retail/src/v2/catalog_service_client.ts
+++ b/packages/google-cloud-retail/src/v2/catalog_service_client.ts
@@ -325,33 +325,6 @@ export class CatalogServiceClient {
// -------------------
// -- Service calls --
// -------------------
- updateCatalog(
- request?: protos.google.cloud.retail.v2.IUpdateCatalogRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.ICatalog,
- protos.google.cloud.retail.v2.IUpdateCatalogRequest | undefined,
- {} | undefined
- ]
- >;
- updateCatalog(
- request: protos.google.cloud.retail.v2.IUpdateCatalogRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2.ICatalog,
- protos.google.cloud.retail.v2.IUpdateCatalogRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- updateCatalog(
- request: protos.google.cloud.retail.v2.IUpdateCatalogRequest,
- callback: Callback<
- protos.google.cloud.retail.v2.ICatalog,
- protos.google.cloud.retail.v2.IUpdateCatalogRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Updates the {@link google.cloud.retail.v2.Catalog|Catalog}s.
*
@@ -379,9 +352,36 @@ export class CatalogServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.updateCatalog(request);
+ * @example
include:samples/generated/v2/catalog_service.update_catalog.js
+ * region_tag:retail_v2_generated_CatalogService_UpdateCatalog_async
*/
+ updateCatalog(
+ request?: protos.google.cloud.retail.v2.IUpdateCatalogRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.ICatalog,
+ protos.google.cloud.retail.v2.IUpdateCatalogRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ updateCatalog(
+ request: protos.google.cloud.retail.v2.IUpdateCatalogRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2.ICatalog,
+ protos.google.cloud.retail.v2.IUpdateCatalogRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ updateCatalog(
+ request: protos.google.cloud.retail.v2.IUpdateCatalogRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2.ICatalog,
+ protos.google.cloud.retail.v2.IUpdateCatalogRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
updateCatalog(
request?: protos.google.cloud.retail.v2.IUpdateCatalogRequest,
optionsOrCallback?:
@@ -423,33 +423,6 @@ export class CatalogServiceClient {
this.initialize();
return this.innerApiCalls.updateCatalog(request, options, callback);
}
- setDefaultBranch(
- request?: protos.google.cloud.retail.v2.ISetDefaultBranchRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2.ISetDefaultBranchRequest | undefined,
- {} | undefined
- ]
- >;
- setDefaultBranch(
- request: protos.google.cloud.retail.v2.ISetDefaultBranchRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2.ISetDefaultBranchRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- setDefaultBranch(
- request: protos.google.cloud.retail.v2.ISetDefaultBranchRequest,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2.ISetDefaultBranchRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Set a specified branch id as default branch. API methods such as
* {@link google.cloud.retail.v2.SearchService.Search|SearchService.Search},
@@ -513,9 +486,36 @@ export class CatalogServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.setDefaultBranch(request);
+ * @example include:samples/generated/v2/catalog_service.set_default_branch.js
+ * region_tag:retail_v2_generated_CatalogService_SetDefaultBranch_async
*/
+ setDefaultBranch(
+ request?: protos.google.cloud.retail.v2.ISetDefaultBranchRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2.ISetDefaultBranchRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ setDefaultBranch(
+ request: protos.google.cloud.retail.v2.ISetDefaultBranchRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2.ISetDefaultBranchRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ setDefaultBranch(
+ request: protos.google.cloud.retail.v2.ISetDefaultBranchRequest,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2.ISetDefaultBranchRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
setDefaultBranch(
request?: protos.google.cloud.retail.v2.ISetDefaultBranchRequest,
optionsOrCallback?:
@@ -557,6 +557,30 @@ export class CatalogServiceClient {
this.initialize();
return this.innerApiCalls.setDefaultBranch(request, options, callback);
}
+ /**
+ * Get which branch is currently default branch set by
+ * {@link google.cloud.retail.v2.CatalogService.SetDefaultBranch|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.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.catalog
+ * The parent catalog resource name, such as
+ * `projects/* /locations/global/catalogs/default_catalog`.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [GetDefaultBranchResponse]{@link google.cloud.retail.v2.GetDefaultBranchResponse}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2/catalog_service.get_default_branch.js
+ * region_tag:retail_v2_generated_CatalogService_GetDefaultBranch_async
+ */
getDefaultBranch(
request?: protos.google.cloud.retail.v2.IGetDefaultBranchRequest,
options?: CallOptions
@@ -584,30 +608,6 @@ export class CatalogServiceClient {
{} | null | undefined
>
): void;
- /**
- * Get which branch is currently default branch set by
- * {@link google.cloud.retail.v2.CatalogService.SetDefaultBranch|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.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.catalog
- * The parent catalog resource name, such as
- * `projects/* /locations/global/catalogs/default_catalog`.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [GetDefaultBranchResponse]{@link google.cloud.retail.v2.GetDefaultBranchResponse}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getDefaultBranch(request);
- */
getDefaultBranch(
request?: protos.google.cloud.retail.v2.IGetDefaultBranchRequest,
optionsOrCallback?:
@@ -650,33 +650,6 @@ export class CatalogServiceClient {
return this.innerApiCalls.getDefaultBranch(request, options, callback);
}
- listCatalogs(
- request?: protos.google.cloud.retail.v2.IListCatalogsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.ICatalog[],
- protos.google.cloud.retail.v2.IListCatalogsRequest | null,
- protos.google.cloud.retail.v2.IListCatalogsResponse
- ]
- >;
- listCatalogs(
- request: protos.google.cloud.retail.v2.IListCatalogsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2.IListCatalogsRequest,
- protos.google.cloud.retail.v2.IListCatalogsResponse | null | undefined,
- protos.google.cloud.retail.v2.ICatalog
- >
- ): void;
- listCatalogs(
- request: protos.google.cloud.retail.v2.IListCatalogsRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2.IListCatalogsRequest,
- protos.google.cloud.retail.v2.IListCatalogsResponse | null | undefined,
- protos.google.cloud.retail.v2.ICatalog
- >
- ): void;
/**
* Lists all the {@link google.cloud.retail.v2.Catalog|Catalog}s associated with
* the project.
@@ -720,6 +693,33 @@ export class CatalogServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listCatalogs(
+ request?: protos.google.cloud.retail.v2.IListCatalogsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.ICatalog[],
+ protos.google.cloud.retail.v2.IListCatalogsRequest | null,
+ protos.google.cloud.retail.v2.IListCatalogsResponse
+ ]
+ >;
+ listCatalogs(
+ request: protos.google.cloud.retail.v2.IListCatalogsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2.IListCatalogsRequest,
+ protos.google.cloud.retail.v2.IListCatalogsResponse | null | undefined,
+ protos.google.cloud.retail.v2.ICatalog
+ >
+ ): void;
+ listCatalogs(
+ request: protos.google.cloud.retail.v2.IListCatalogsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2.IListCatalogsRequest,
+ protos.google.cloud.retail.v2.IListCatalogsResponse | null | undefined,
+ protos.google.cloud.retail.v2.ICatalog
+ >
+ ): void;
listCatalogs(
request?: protos.google.cloud.retail.v2.IListCatalogsRequest,
optionsOrCallback?:
@@ -864,11 +864,8 @@ export class CatalogServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listCatalogsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2/catalog_service.list_catalogs.js
+ * region_tag:retail_v2_generated_CatalogService_ListCatalogs_async
*/
listCatalogsAsync(
request?: protos.google.cloud.retail.v2.IListCatalogsRequest,
@@ -882,7 +879,6 @@ export class CatalogServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listCatalogs'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2/completion_service_client.ts b/packages/google-cloud-retail/src/v2/completion_service_client.ts
index c92fcae85f8..7a5b0bf2310 100644
--- a/packages/google-cloud-retail/src/v2/completion_service_client.ts
+++ b/packages/google-cloud-retail/src/v2/completion_service_client.ts
@@ -335,33 +335,6 @@ export class CompletionServiceClient {
// -------------------
// -- Service calls --
// -------------------
- completeQuery(
- request?: protos.google.cloud.retail.v2.ICompleteQueryRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.ICompleteQueryResponse,
- protos.google.cloud.retail.v2.ICompleteQueryRequest | undefined,
- {} | undefined
- ]
- >;
- completeQuery(
- request: protos.google.cloud.retail.v2.ICompleteQueryRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2.ICompleteQueryResponse,
- protos.google.cloud.retail.v2.ICompleteQueryRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- completeQuery(
- request: protos.google.cloud.retail.v2.ICompleteQueryRequest,
- callback: Callback<
- protos.google.cloud.retail.v2.ICompleteQueryResponse,
- protos.google.cloud.retail.v2.ICompleteQueryRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Completes the specified prefix with keyword suggestions.
*
@@ -438,9 +411,36 @@ export class CompletionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.completeQuery(request);
+ * @example include:samples/generated/v2/completion_service.complete_query.js
+ * region_tag:retail_v2_generated_CompletionService_CompleteQuery_async
*/
+ completeQuery(
+ request?: protos.google.cloud.retail.v2.ICompleteQueryRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.ICompleteQueryResponse,
+ protos.google.cloud.retail.v2.ICompleteQueryRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ completeQuery(
+ request: protos.google.cloud.retail.v2.ICompleteQueryRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2.ICompleteQueryResponse,
+ protos.google.cloud.retail.v2.ICompleteQueryRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ completeQuery(
+ request: protos.google.cloud.retail.v2.ICompleteQueryRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2.ICompleteQueryResponse,
+ protos.google.cloud.retail.v2.ICompleteQueryRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
completeQuery(
request?: protos.google.cloud.retail.v2.ICompleteQueryRequest,
optionsOrCallback?:
@@ -483,6 +483,41 @@ export class CompletionServiceClient {
return this.innerApiCalls.completeQuery(request, options, callback);
}
+ /**
+ * 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.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The catalog which the suggestions dataset belongs to.
+ *
+ * Format: `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2.CompletionDataInputConfig} request.inputConfig
+ * Required. The desired input location of the data.
+ * @param {string} request.notificationPubsubTopic
+ * Pub/Sub topic for receiving notification. If this field is set,
+ * when the import is finished, a notification will be sent to
+ * specified Pub/Sub topic. The message data will be JSON string of a
+ * {@link google.longrunning.Operation|Operation}.
+ * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2/completion_service.import_completion_data.js
+ * region_tag:retail_v2_generated_CompletionService_ImportCompletionData_async
+ */
importCompletionData(
request?: protos.google.cloud.retail.v2.IImportCompletionDataRequest,
options?: CallOptions
@@ -519,42 +554,6 @@ export class CompletionServiceClient {
{} | null | undefined
>
): void;
- /**
- * 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.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The catalog which the suggestions dataset belongs to.
- *
- * Format: `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2.CompletionDataInputConfig} request.inputConfig
- * Required. The desired input location of the data.
- * @param {string} request.notificationPubsubTopic
- * Pub/Sub topic for receiving notification. If this field is set,
- * when the import is finished, a notification will be sent to
- * specified Pub/Sub topic. The message data will be JSON string of a
- * {@link google.longrunning.Operation|Operation}.
- * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.importCompletionData(request);
- * const [response] = await operation.promise();
- */
importCompletionData(
request?: protos.google.cloud.retail.v2.IImportCompletionDataRequest,
optionsOrCallback?:
@@ -612,11 +611,8 @@ export class CompletionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportCompletionDataProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/completion_service.import_completion_data.js
+ * region_tag:retail_v2_generated_CompletionService_ImportCompletionData_async
*/
async checkImportCompletionDataProgress(
name: string
diff --git a/packages/google-cloud-retail/src/v2/prediction_service_client.ts b/packages/google-cloud-retail/src/v2/prediction_service_client.ts
index d2b85fcfa8c..4ff765ed50b 100644
--- a/packages/google-cloud-retail/src/v2/prediction_service_client.ts
+++ b/packages/google-cloud-retail/src/v2/prediction_service_client.ts
@@ -294,33 +294,6 @@ export class PredictionServiceClient {
// -------------------
// -- Service calls --
// -------------------
- predict(
- request?: protos.google.cloud.retail.v2.IPredictRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.IPredictResponse,
- protos.google.cloud.retail.v2.IPredictRequest | undefined,
- {} | undefined
- ]
- >;
- predict(
- request: protos.google.cloud.retail.v2.IPredictRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2.IPredictResponse,
- protos.google.cloud.retail.v2.IPredictRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- predict(
- request: protos.google.cloud.retail.v2.IPredictRequest,
- callback: Callback<
- protos.google.cloud.retail.v2.IPredictResponse,
- protos.google.cloud.retail.v2.IPredictRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Makes a recommendation prediction.
*
@@ -431,9 +404,36 @@ export class PredictionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.predict(request);
+ * @example include:samples/generated/v2/prediction_service.predict.js
+ * region_tag:retail_v2_generated_PredictionService_Predict_async
*/
+ predict(
+ request?: protos.google.cloud.retail.v2.IPredictRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.IPredictResponse,
+ protos.google.cloud.retail.v2.IPredictRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ predict(
+ request: protos.google.cloud.retail.v2.IPredictRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2.IPredictResponse,
+ protos.google.cloud.retail.v2.IPredictRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ predict(
+ request: protos.google.cloud.retail.v2.IPredictRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2.IPredictResponse,
+ protos.google.cloud.retail.v2.IPredictRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
predict(
request?: protos.google.cloud.retail.v2.IPredictRequest,
optionsOrCallback?:
diff --git a/packages/google-cloud-retail/src/v2/product_service_client.ts b/packages/google-cloud-retail/src/v2/product_service_client.ts
index 93f17ab41ef..46c20ec7617 100644
--- a/packages/google-cloud-retail/src/v2/product_service_client.ts
+++ b/packages/google-cloud-retail/src/v2/product_service_client.ts
@@ -397,33 +397,6 @@ export class ProductServiceClient {
// -------------------
// -- Service calls --
// -------------------
- createProduct(
- request?: protos.google.cloud.retail.v2.ICreateProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.IProduct,
- protos.google.cloud.retail.v2.ICreateProductRequest | undefined,
- {} | undefined
- ]
- >;
- createProduct(
- request: protos.google.cloud.retail.v2.ICreateProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2.IProduct,
- protos.google.cloud.retail.v2.ICreateProductRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- createProduct(
- request: protos.google.cloud.retail.v2.ICreateProductRequest,
- callback: Callback<
- protos.google.cloud.retail.v2.IProduct,
- protos.google.cloud.retail.v2.ICreateProductRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Creates a {@link google.cloud.retail.v2.Product|Product}.
*
@@ -457,9 +430,36 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.createProduct(request);
+ * @example include:samples/generated/v2/product_service.create_product.js
+ * region_tag:retail_v2_generated_ProductService_CreateProduct_async
*/
+ createProduct(
+ request?: protos.google.cloud.retail.v2.ICreateProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.IProduct,
+ protos.google.cloud.retail.v2.ICreateProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ createProduct(
+ request: protos.google.cloud.retail.v2.ICreateProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2.IProduct,
+ protos.google.cloud.retail.v2.ICreateProductRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ createProduct(
+ request: protos.google.cloud.retail.v2.ICreateProductRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2.IProduct,
+ protos.google.cloud.retail.v2.ICreateProductRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
createProduct(
request?: protos.google.cloud.retail.v2.ICreateProductRequest,
optionsOrCallback?:
@@ -501,6 +501,32 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.createProduct(request, options, callback);
}
+ /**
+ * Gets a {@link google.cloud.retail.v2.Product|Product}.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.name
+ * Required. Full resource name of {@link google.cloud.retail.v2.Product|Product},
+ * such as
+ * `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
+ *
+ * If the caller does not have permission to access the
+ * {@link google.cloud.retail.v2.Product|Product}, regardless of whether or not it
+ * exists, a PERMISSION_DENIED error is returned.
+ *
+ * If the requested {@link google.cloud.retail.v2.Product|Product} does not exist,
+ * a NOT_FOUND error is returned.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [Product]{@link google.cloud.retail.v2.Product}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2/product_service.get_product.js
+ * region_tag:retail_v2_generated_ProductService_GetProduct_async
+ */
getProduct(
request?: protos.google.cloud.retail.v2.IGetProductRequest,
options?: CallOptions
@@ -528,32 +554,6 @@ export class ProductServiceClient {
{} | null | undefined
>
): void;
- /**
- * Gets a {@link google.cloud.retail.v2.Product|Product}.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.name
- * Required. Full resource name of {@link google.cloud.retail.v2.Product|Product},
- * such as
- * `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
- *
- * If the caller does not have permission to access the
- * {@link google.cloud.retail.v2.Product|Product}, regardless of whether or not it
- * exists, a PERMISSION_DENIED error is returned.
- *
- * If the requested {@link google.cloud.retail.v2.Product|Product} does not exist,
- * a NOT_FOUND error is returned.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [Product]{@link google.cloud.retail.v2.Product}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getProduct(request);
- */
getProduct(
request?: protos.google.cloud.retail.v2.IGetProductRequest,
optionsOrCallback?:
@@ -593,33 +593,6 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.getProduct(request, options, callback);
}
- updateProduct(
- request?: protos.google.cloud.retail.v2.IUpdateProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.IProduct,
- protos.google.cloud.retail.v2.IUpdateProductRequest | undefined,
- {} | undefined
- ]
- >;
- updateProduct(
- request: protos.google.cloud.retail.v2.IUpdateProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2.IProduct,
- protos.google.cloud.retail.v2.IUpdateProductRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- updateProduct(
- request: protos.google.cloud.retail.v2.IUpdateProductRequest,
- callback: Callback<
- protos.google.cloud.retail.v2.IProduct,
- protos.google.cloud.retail.v2.IUpdateProductRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Updates a {@link google.cloud.retail.v2.Product|Product}.
*
@@ -655,9 +628,36 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.updateProduct(request);
+ * @example include:samples/generated/v2/product_service.update_product.js
+ * region_tag:retail_v2_generated_ProductService_UpdateProduct_async
*/
+ updateProduct(
+ request?: protos.google.cloud.retail.v2.IUpdateProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.IProduct,
+ protos.google.cloud.retail.v2.IUpdateProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ updateProduct(
+ request: protos.google.cloud.retail.v2.IUpdateProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2.IProduct,
+ protos.google.cloud.retail.v2.IUpdateProductRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ updateProduct(
+ request: protos.google.cloud.retail.v2.IUpdateProductRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2.IProduct,
+ protos.google.cloud.retail.v2.IUpdateProductRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
updateProduct(
request?: protos.google.cloud.retail.v2.IUpdateProductRequest,
optionsOrCallback?:
@@ -699,33 +699,6 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.updateProduct(request, options, callback);
}
- deleteProduct(
- request?: protos.google.cloud.retail.v2.IDeleteProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2.IDeleteProductRequest | undefined,
- {} | undefined
- ]
- >;
- deleteProduct(
- request: protos.google.cloud.retail.v2.IDeleteProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2.IDeleteProductRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- deleteProduct(
- request: protos.google.cloud.retail.v2.IDeleteProductRequest,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2.IDeleteProductRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Deletes a {@link google.cloud.retail.v2.Product|Product}.
*
@@ -760,9 +733,36 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.deleteProduct(request);
+ * @example include:samples/generated/v2/product_service.delete_product.js
+ * region_tag:retail_v2_generated_ProductService_DeleteProduct_async
*/
+ deleteProduct(
+ request?: protos.google.cloud.retail.v2.IDeleteProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2.IDeleteProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ deleteProduct(
+ request: protos.google.cloud.retail.v2.IDeleteProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2.IDeleteProductRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ deleteProduct(
+ request: protos.google.cloud.retail.v2.IDeleteProductRequest,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2.IDeleteProductRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
deleteProduct(
request?: protos.google.cloud.retail.v2.IDeleteProductRequest,
optionsOrCallback?:
@@ -805,42 +805,6 @@ export class ProductServiceClient {
return this.innerApiCalls.deleteProduct(request, options, callback);
}
- importProducts(
- request?: protos.google.cloud.retail.v2.IImportProductsRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2.IImportProductsResponse,
- protos.google.cloud.retail.v2.IImportMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- importProducts(
- request: protos.google.cloud.retail.v2.IImportProductsRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IImportProductsResponse,
- protos.google.cloud.retail.v2.IImportMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- importProducts(
- request: protos.google.cloud.retail.v2.IImportProductsRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IImportProductsResponse,
- protos.google.cloud.retail.v2.IImportMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Bulk import of multiple {@link google.cloud.retail.v2.Product|Product}s.
*
@@ -898,10 +862,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.importProducts(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2/product_service.import_products.js
+ * region_tag:retail_v2_generated_ProductService_ImportProducts_async
*/
+ importProducts(
+ request?: protos.google.cloud.retail.v2.IImportProductsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2.IImportProductsResponse,
+ protos.google.cloud.retail.v2.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ importProducts(
+ request: protos.google.cloud.retail.v2.IImportProductsRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IImportProductsResponse,
+ protos.google.cloud.retail.v2.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ importProducts(
+ request: protos.google.cloud.retail.v2.IImportProductsRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IImportProductsResponse,
+ protos.google.cloud.retail.v2.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
importProducts(
request?: protos.google.cloud.retail.v2.IImportProductsRequest,
optionsOrCallback?:
@@ -959,70 +958,31 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportProductsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/product_service.import_products.js
+ * region_tag:retail_v2_generated_ProductService_ImportProducts_async
*/
async checkImportProductsProgress(
- name: string
- ): Promise<
- LROperation<
- protos.google.cloud.retail.v2.ImportProductsResponse,
- protos.google.cloud.retail.v2.ImportMetadata
- >
- > {
- const request = new operationsProtos.google.longrunning.GetOperationRequest(
- {name}
- );
- const [operation] = await this.operationsClient.getOperation(request);
- const decodeOperation = new gax.Operation(
- operation,
- this.descriptors.longrunning.importProducts,
- gax.createDefaultBackoffSettings()
- );
- return decodeOperation as LROperation<
- protos.google.cloud.retail.v2.ImportProductsResponse,
- protos.google.cloud.retail.v2.ImportMetadata
- >;
- }
- setInventory(
- request?: protos.google.cloud.retail.v2.ISetInventoryRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2.ISetInventoryResponse,
- protos.google.cloud.retail.v2.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- setInventory(
- request: protos.google.cloud.retail.v2.ISetInventoryRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.ISetInventoryResponse,
- protos.google.cloud.retail.v2.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- setInventory(
- request: protos.google.cloud.retail.v2.ISetInventoryRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.ISetInventoryResponse,
- protos.google.cloud.retail.v2.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
+ name: string
+ ): Promise<
+ LROperation<
+ protos.google.cloud.retail.v2.ImportProductsResponse,
+ protos.google.cloud.retail.v2.ImportMetadata
>
- ): void;
+ > {
+ const request = new operationsProtos.google.longrunning.GetOperationRequest(
+ {name}
+ );
+ const [operation] = await this.operationsClient.getOperation(request);
+ const decodeOperation = new gax.Operation(
+ operation,
+ this.descriptors.longrunning.importProducts,
+ gax.createDefaultBackoffSettings()
+ );
+ return decodeOperation as LROperation<
+ protos.google.cloud.retail.v2.ImportProductsResponse,
+ protos.google.cloud.retail.v2.ImportMetadata
+ >;
+ }
/**
* Updates inventory information for a
* {@link google.cloud.retail.v2.Product|Product} while respecting the last update
@@ -1130,10 +1090,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.setInventory(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2/product_service.set_inventory.js
+ * region_tag:retail_v2_generated_ProductService_SetInventory_async
*/
+ setInventory(
+ request?: protos.google.cloud.retail.v2.ISetInventoryRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2.ISetInventoryResponse,
+ protos.google.cloud.retail.v2.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ setInventory(
+ request: protos.google.cloud.retail.v2.ISetInventoryRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.ISetInventoryResponse,
+ protos.google.cloud.retail.v2.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ setInventory(
+ request: protos.google.cloud.retail.v2.ISetInventoryRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.ISetInventoryResponse,
+ protos.google.cloud.retail.v2.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
setInventory(
request?: protos.google.cloud.retail.v2.ISetInventoryRequest,
optionsOrCallback?:
@@ -1191,11 +1186,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkSetInventoryProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/product_service.set_inventory.js
+ * region_tag:retail_v2_generated_ProductService_SetInventory_async
*/
async checkSetInventoryProgress(
name: string
@@ -1219,42 +1211,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2.SetInventoryMetadata
>;
}
- addFulfillmentPlaces(
- request?: protos.google.cloud.retail.v2.IAddFulfillmentPlacesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- addFulfillmentPlaces(
- request: protos.google.cloud.retail.v2.IAddFulfillmentPlacesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- addFulfillmentPlaces(
- request: protos.google.cloud.retail.v2.IAddFulfillmentPlacesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Incrementally adds place IDs to
* {@link google.cloud.retail.v2.FulfillmentInfo.place_ids|Product.fulfillment_info.place_ids}.
@@ -1338,10 +1294,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.addFulfillmentPlaces(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2/product_service.add_fulfillment_places.js
+ * region_tag:retail_v2_generated_ProductService_AddFulfillmentPlaces_async
*/
+ addFulfillmentPlaces(
+ request?: protos.google.cloud.retail.v2.IAddFulfillmentPlacesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ addFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2.IAddFulfillmentPlacesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ addFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2.IAddFulfillmentPlacesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
addFulfillmentPlaces(
request?: protos.google.cloud.retail.v2.IAddFulfillmentPlacesRequest,
optionsOrCallback?:
@@ -1399,11 +1390,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkAddFulfillmentPlacesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/product_service.add_fulfillment_places.js
+ * region_tag:retail_v2_generated_ProductService_AddFulfillmentPlaces_async
*/
async checkAddFulfillmentPlacesProgress(
name: string
@@ -1427,42 +1415,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2.AddFulfillmentPlacesMetadata
>;
}
- removeFulfillmentPlaces(
- request?: protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- removeFulfillmentPlaces(
- request: protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- removeFulfillmentPlaces(
- request: protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Incrementally removes place IDs from a
* {@link google.cloud.retail.v2.FulfillmentInfo.place_ids|Product.fulfillment_info.place_ids}.
@@ -1541,10 +1493,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.removeFulfillmentPlaces(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2/product_service.remove_fulfillment_places.js
+ * region_tag:retail_v2_generated_ProductService_RemoveFulfillmentPlaces_async
*/
+ removeFulfillmentPlaces(
+ request?: protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ removeFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ removeFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
removeFulfillmentPlaces(
request?: protos.google.cloud.retail.v2.IRemoveFulfillmentPlacesRequest,
optionsOrCallback?:
@@ -1606,11 +1593,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkRemoveFulfillmentPlacesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/product_service.remove_fulfillment_places.js
+ * region_tag:retail_v2_generated_ProductService_RemoveFulfillmentPlaces_async
*/
async checkRemoveFulfillmentPlacesProgress(
name: string
@@ -1634,33 +1618,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata
>;
}
- listProducts(
- request?: protos.google.cloud.retail.v2.IListProductsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.IProduct[],
- protos.google.cloud.retail.v2.IListProductsRequest | null,
- protos.google.cloud.retail.v2.IListProductsResponse
- ]
- >;
- listProducts(
- request: protos.google.cloud.retail.v2.IListProductsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2.IListProductsRequest,
- protos.google.cloud.retail.v2.IListProductsResponse | null | undefined,
- protos.google.cloud.retail.v2.IProduct
- >
- ): void;
- listProducts(
- request: protos.google.cloud.retail.v2.IListProductsRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2.IListProductsRequest,
- protos.google.cloud.retail.v2.IListProductsResponse | null | undefined,
- protos.google.cloud.retail.v2.IProduct
- >
- ): void;
/**
* Gets a list of {@link google.cloud.retail.v2.Product|Product}s.
*
@@ -1752,6 +1709,33 @@ export class ProductServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listProducts(
+ request?: protos.google.cloud.retail.v2.IListProductsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.IProduct[],
+ protos.google.cloud.retail.v2.IListProductsRequest | null,
+ protos.google.cloud.retail.v2.IListProductsResponse
+ ]
+ >;
+ listProducts(
+ request: protos.google.cloud.retail.v2.IListProductsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2.IListProductsRequest,
+ protos.google.cloud.retail.v2.IListProductsResponse | null | undefined,
+ protos.google.cloud.retail.v2.IProduct
+ >
+ ): void;
+ listProducts(
+ request: protos.google.cloud.retail.v2.IListProductsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2.IListProductsRequest,
+ protos.google.cloud.retail.v2.IListProductsResponse | null | undefined,
+ protos.google.cloud.retail.v2.IProduct
+ >
+ ): void;
listProducts(
request?: protos.google.cloud.retail.v2.IListProductsRequest,
optionsOrCallback?:
@@ -1994,11 +1978,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listProductsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2/product_service.list_products.js
+ * region_tag:retail_v2_generated_ProductService_ListProducts_async
*/
listProductsAsync(
request?: protos.google.cloud.retail.v2.IListProductsRequest,
@@ -2012,7 +1993,6 @@ export class ProductServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listProducts'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2/search_service_client.ts b/packages/google-cloud-retail/src/v2/search_service_client.ts
index e2652fe8cc9..e70153e5fa5 100644
--- a/packages/google-cloud-retail/src/v2/search_service_client.ts
+++ b/packages/google-cloud-retail/src/v2/search_service_client.ts
@@ -322,33 +322,6 @@ export class SearchServiceClient {
// -- Service calls --
// -------------------
- search(
- request?: protos.google.cloud.retail.v2.ISearchRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2.SearchResponse.ISearchResult[],
- protos.google.cloud.retail.v2.ISearchRequest | null,
- protos.google.cloud.retail.v2.ISearchResponse
- ]
- >;
- search(
- request: protos.google.cloud.retail.v2.ISearchRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2.ISearchRequest,
- protos.google.cloud.retail.v2.ISearchResponse | null | undefined,
- protos.google.cloud.retail.v2.SearchResponse.ISearchResult
- >
- ): void;
- search(
- request: protos.google.cloud.retail.v2.ISearchRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2.ISearchRequest,
- protos.google.cloud.retail.v2.ISearchResponse | null | undefined,
- protos.google.cloud.retail.v2.SearchResponse.ISearchResult
- >
- ): void;
/**
* Performs a search.
*
@@ -547,6 +520,33 @@ export class SearchServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ search(
+ request?: protos.google.cloud.retail.v2.ISearchRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2.SearchResponse.ISearchResult[],
+ protos.google.cloud.retail.v2.ISearchRequest | null,
+ protos.google.cloud.retail.v2.ISearchResponse
+ ]
+ >;
+ search(
+ request: protos.google.cloud.retail.v2.ISearchRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2.ISearchRequest,
+ protos.google.cloud.retail.v2.ISearchResponse | null | undefined,
+ protos.google.cloud.retail.v2.SearchResponse.ISearchResult
+ >
+ ): void;
+ search(
+ request: protos.google.cloud.retail.v2.ISearchRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2.ISearchRequest,
+ protos.google.cloud.retail.v2.ISearchResponse | null | undefined,
+ protos.google.cloud.retail.v2.SearchResponse.ISearchResult
+ >
+ ): void;
search(
request?: protos.google.cloud.retail.v2.ISearchRequest,
optionsOrCallback?:
@@ -993,11 +993,8 @@ export class SearchServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.searchAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2/search_service.search.js
+ * region_tag:retail_v2_generated_SearchService_Search_async
*/
searchAsync(
request?: protos.google.cloud.retail.v2.ISearchRequest,
@@ -1011,7 +1008,6 @@ export class SearchServiceClient {
gax.routingHeader.fromParams({
placement: request.placement || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['search'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2/user_event_service_client.ts b/packages/google-cloud-retail/src/v2/user_event_service_client.ts
index 0d05bdb6998..8e8a3289578 100644
--- a/packages/google-cloud-retail/src/v2/user_event_service_client.ts
+++ b/packages/google-cloud-retail/src/v2/user_event_service_client.ts
@@ -356,6 +356,26 @@ export class UserEventServiceClient {
// -------------------
// -- Service calls --
// -------------------
+ /**
+ * Writes a single user event.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The parent catalog resource name, such as
+ * `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2.UserEvent} request.userEvent
+ * Required. User event to write.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [UserEvent]{@link google.cloud.retail.v2.UserEvent}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2/user_event_service.write_user_event.js
+ * region_tag:retail_v2_generated_UserEventService_WriteUserEvent_async
+ */
writeUserEvent(
request?: protos.google.cloud.retail.v2.IWriteUserEventRequest,
options?: CallOptions
@@ -383,26 +403,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Writes a single user event.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The parent catalog resource name, such as
- * `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2.UserEvent} request.userEvent
- * Required. User event to write.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [UserEvent]{@link google.cloud.retail.v2.UserEvent}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.writeUserEvent(request);
- */
writeUserEvent(
request?: protos.google.cloud.retail.v2.IWriteUserEventRequest,
optionsOrCallback?:
@@ -444,33 +444,6 @@ export class UserEventServiceClient {
this.initialize();
return this.innerApiCalls.writeUserEvent(request, options, callback);
}
- collectUserEvent(
- request?: protos.google.cloud.retail.v2.ICollectUserEventRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.api.IHttpBody,
- protos.google.cloud.retail.v2.ICollectUserEventRequest | undefined,
- {} | undefined
- ]
- >;
- collectUserEvent(
- request: protos.google.cloud.retail.v2.ICollectUserEventRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.api.IHttpBody,
- protos.google.cloud.retail.v2.ICollectUserEventRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- collectUserEvent(
- request: protos.google.cloud.retail.v2.ICollectUserEventRequest,
- callback: Callback<
- protos.google.api.IHttpBody,
- protos.google.cloud.retail.v2.ICollectUserEventRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Writes a single user event from the browser. This uses a GET request to
* due to browser restriction of POST-ing to a 3rd party domain.
@@ -502,9 +475,36 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.collectUserEvent(request);
+ * @example include:samples/generated/v2/user_event_service.collect_user_event.js
+ * region_tag:retail_v2_generated_UserEventService_CollectUserEvent_async
*/
+ collectUserEvent(
+ request?: protos.google.cloud.retail.v2.ICollectUserEventRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.api.IHttpBody,
+ protos.google.cloud.retail.v2.ICollectUserEventRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ collectUserEvent(
+ request: protos.google.cloud.retail.v2.ICollectUserEventRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.api.IHttpBody,
+ protos.google.cloud.retail.v2.ICollectUserEventRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ collectUserEvent(
+ request: protos.google.cloud.retail.v2.ICollectUserEventRequest,
+ callback: Callback<
+ protos.google.api.IHttpBody,
+ protos.google.cloud.retail.v2.ICollectUserEventRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
collectUserEvent(
request?: protos.google.cloud.retail.v2.ICollectUserEventRequest,
optionsOrCallback?:
@@ -547,42 +547,6 @@ export class UserEventServiceClient {
return this.innerApiCalls.collectUserEvent(request, options, callback);
}
- purgeUserEvents(
- request?: protos.google.cloud.retail.v2.IPurgeUserEventsRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- purgeUserEvents(
- request: protos.google.cloud.retail.v2.IPurgeUserEventsRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- purgeUserEvents(
- request: protos.google.cloud.retail.v2.IPurgeUserEventsRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Deletes permanently all user events specified by the filter provided.
* Depending on the number of events specified by the filter, this operation
@@ -632,10 +596,45 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.purgeUserEvents(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2/user_event_service.purge_user_events.js
+ * region_tag:retail_v2_generated_UserEventService_PurgeUserEvents_async
*/
+ purgeUserEvents(
+ request?: protos.google.cloud.retail.v2.IPurgeUserEventsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ purgeUserEvents(
+ request: protos.google.cloud.retail.v2.IPurgeUserEventsRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ purgeUserEvents(
+ request: protos.google.cloud.retail.v2.IPurgeUserEventsRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
purgeUserEvents(
request?: protos.google.cloud.retail.v2.IPurgeUserEventsRequest,
optionsOrCallback?:
@@ -693,11 +692,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkPurgeUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/user_event_service.purge_user_events.js
+ * region_tag:retail_v2_generated_UserEventService_PurgeUserEvents_async
*/
async checkPurgeUserEventsProgress(
name: string
@@ -721,6 +717,36 @@ export class UserEventServiceClient {
protos.google.cloud.retail.v2.PurgeMetadata
>;
}
+ /**
+ * Bulk import of User events. Request processing might be
+ * synchronous. Events that already exist are skipped.
+ * Use this method for backfilling historical user events.
+ *
+ * Operation.response is of type ImportResponse. Note that it is
+ * possible for a subset of the items to be successfully inserted.
+ * Operation.metadata is of type ImportMetadata.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. `projects/1234/locations/global/catalogs/default_catalog`
+ * @param {google.cloud.retail.v2.UserEventInputConfig} request.inputConfig
+ * Required. The desired input location of the data.
+ * @param {google.cloud.retail.v2.ImportErrorsConfig} request.errorsConfig
+ * The desired location of errors incurred during the Import. Cannot be set
+ * for inline user event imports.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2/user_event_service.import_user_events.js
+ * region_tag:retail_v2_generated_UserEventService_ImportUserEvents_async
+ */
importUserEvents(
request?: protos.google.cloud.retail.v2.IImportUserEventsRequest,
options?: CallOptions
@@ -757,37 +783,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Bulk import of User events. Request processing might be
- * synchronous. Events that already exist are skipped.
- * Use this method for backfilling historical user events.
- *
- * Operation.response is of type ImportResponse. Note that it is
- * possible for a subset of the items to be successfully inserted.
- * Operation.metadata is of type ImportMetadata.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. `projects/1234/locations/global/catalogs/default_catalog`
- * @param {google.cloud.retail.v2.UserEventInputConfig} request.inputConfig
- * Required. The desired input location of the data.
- * @param {google.cloud.retail.v2.ImportErrorsConfig} request.errorsConfig
- * The desired location of errors incurred during the Import. Cannot be set
- * for inline user event imports.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.importUserEvents(request);
- * const [response] = await operation.promise();
- */
importUserEvents(
request?: protos.google.cloud.retail.v2.IImportUserEventsRequest,
optionsOrCallback?:
@@ -845,11 +840,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/user_event_service.import_user_events.js
+ * region_tag:retail_v2_generated_UserEventService_ImportUserEvents_async
*/
async checkImportUserEventsProgress(
name: string
@@ -873,6 +865,37 @@ export class UserEventServiceClient {
protos.google.cloud.retail.v2.ImportMetadata
>;
}
+ /**
+ * Triggers 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 API can be used to trigger a 'join' operation on specified
+ * events with latest version of product catalog. It can also be used to
+ * correct events joined with wrong product catalog.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The parent catalog resource name, such as
+ * `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope} request.userEventRejoinScope
+ * The type of the user event rejoin to define the scope and range of the user
+ * events to be rejoined with the latest product catalog. Defaults to
+ * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
+ * invalid integer value.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2/user_event_service.rejoin_user_events.js
+ * region_tag:retail_v2_generated_UserEventService_RejoinUserEvents_async
+ */
rejoinUserEvents(
request?: protos.google.cloud.retail.v2.IRejoinUserEventsRequest,
options?: CallOptions
@@ -909,38 +932,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Triggers 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 API can be used to trigger a 'join' operation on specified
- * events with latest version of product catalog. It can also be used to
- * correct events joined with wrong product catalog.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The parent catalog resource name, such as
- * `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope} request.userEventRejoinScope
- * The type of the user event rejoin to define the scope and range of the user
- * events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.rejoinUserEvents(request);
- * const [response] = await operation.promise();
- */
rejoinUserEvents(
request?: protos.google.cloud.retail.v2.IRejoinUserEventsRequest,
optionsOrCallback?:
@@ -998,11 +989,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkRejoinUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2/user_event_service.rejoin_user_events.js
+ * region_tag:retail_v2_generated_UserEventService_RejoinUserEvents_async
*/
async checkRejoinUserEventsProgress(
name: string
diff --git a/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts b/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts
index 67bba9a009b..f9ce0a35cbf 100644
--- a/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts
+++ b/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts
@@ -325,6 +325,36 @@ export class CatalogServiceClient {
// -------------------
// -- Service calls --
// -------------------
+ /**
+ * Updates the {@link google.cloud.retail.v2alpha.Catalog|Catalog}s.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {google.cloud.retail.v2alpha.Catalog} request.catalog
+ * Required. The {@link google.cloud.retail.v2alpha.Catalog|Catalog} to update.
+ *
+ * If the caller does not have permission to update the
+ * {@link google.cloud.retail.v2alpha.Catalog|Catalog}, regardless of whether or
+ * not it exists, a PERMISSION_DENIED error is returned.
+ *
+ * If the {@link google.cloud.retail.v2alpha.Catalog|Catalog} to update does not
+ * exist, a NOT_FOUND error is returned.
+ * @param {google.protobuf.FieldMask} request.updateMask
+ * Indicates which fields in the provided
+ * {@link google.cloud.retail.v2alpha.Catalog|Catalog} to update.
+ *
+ * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
+ * is returned.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [Catalog]{@link google.cloud.retail.v2alpha.Catalog}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2alpha/catalog_service.update_catalog.js
+ * region_tag:retail_v2alpha_generated_CatalogService_UpdateCatalog_async
+ */
updateCatalog(
request?: protos.google.cloud.retail.v2alpha.IUpdateCatalogRequest,
options?: CallOptions
@@ -356,36 +386,6 @@ export class CatalogServiceClient {
{} | null | undefined
>
): void;
- /**
- * Updates the {@link google.cloud.retail.v2alpha.Catalog|Catalog}s.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {google.cloud.retail.v2alpha.Catalog} request.catalog
- * Required. The {@link google.cloud.retail.v2alpha.Catalog|Catalog} to update.
- *
- * If the caller does not have permission to update the
- * {@link google.cloud.retail.v2alpha.Catalog|Catalog}, regardless of whether or
- * not it exists, a PERMISSION_DENIED error is returned.
- *
- * If the {@link google.cloud.retail.v2alpha.Catalog|Catalog} to update does not
- * exist, a NOT_FOUND error is returned.
- * @param {google.protobuf.FieldMask} request.updateMask
- * Indicates which fields in the provided
- * {@link google.cloud.retail.v2alpha.Catalog|Catalog} to update.
- *
- * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
- * is returned.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [Catalog]{@link google.cloud.retail.v2alpha.Catalog}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.updateCatalog(request);
- */
updateCatalog(
request?: protos.google.cloud.retail.v2alpha.IUpdateCatalogRequest,
optionsOrCallback?:
@@ -429,37 +429,6 @@ export class CatalogServiceClient {
this.initialize();
return this.innerApiCalls.updateCatalog(request, options, callback);
}
- setDefaultBranch(
- request?: protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest | undefined,
- {} | undefined
- ]
- >;
- setDefaultBranch(
- request: protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- setDefaultBranch(
- request: protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Set a specified branch id as default branch. API methods such as
* {@link google.cloud.retail.v2alpha.SearchService.Search|SearchService.Search},
@@ -523,9 +492,40 @@ export class CatalogServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.setDefaultBranch(request);
+ * @example include:samples/generated/v2alpha/catalog_service.set_default_branch.js
+ * region_tag:retail_v2alpha_generated_CatalogService_SetDefaultBranch_async
*/
+ setDefaultBranch(
+ request?: protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ setDefaultBranch(
+ request: protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ setDefaultBranch(
+ request: protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
setDefaultBranch(
request?: protos.google.cloud.retail.v2alpha.ISetDefaultBranchRequest,
optionsOrCallback?:
@@ -569,6 +569,30 @@ export class CatalogServiceClient {
this.initialize();
return this.innerApiCalls.setDefaultBranch(request, options, callback);
}
+ /**
+ * Get which branch is currently default branch set by
+ * {@link google.cloud.retail.v2alpha.CatalogService.SetDefaultBranch|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.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.catalog
+ * The parent catalog resource name, such as
+ * `projects/* /locations/global/catalogs/default_catalog`.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [GetDefaultBranchResponse]{@link google.cloud.retail.v2alpha.GetDefaultBranchResponse}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2alpha/catalog_service.get_default_branch.js
+ * region_tag:retail_v2alpha_generated_CatalogService_GetDefaultBranch_async
+ */
getDefaultBranch(
request?: protos.google.cloud.retail.v2alpha.IGetDefaultBranchRequest,
options?: CallOptions
@@ -600,30 +624,6 @@ export class CatalogServiceClient {
{} | null | undefined
>
): void;
- /**
- * Get which branch is currently default branch set by
- * {@link google.cloud.retail.v2alpha.CatalogService.SetDefaultBranch|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.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.catalog
- * The parent catalog resource name, such as
- * `projects/* /locations/global/catalogs/default_catalog`.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [GetDefaultBranchResponse]{@link google.cloud.retail.v2alpha.GetDefaultBranchResponse}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getDefaultBranch(request);
- */
getDefaultBranch(
request?: protos.google.cloud.retail.v2alpha.IGetDefaultBranchRequest,
optionsOrCallback?:
@@ -668,37 +668,6 @@ export class CatalogServiceClient {
return this.innerApiCalls.getDefaultBranch(request, options, callback);
}
- listCatalogs(
- request?: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2alpha.ICatalog[],
- protos.google.cloud.retail.v2alpha.IListCatalogsRequest | null,
- protos.google.cloud.retail.v2alpha.IListCatalogsResponse
- ]
- >;
- listCatalogs(
- request: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
- | protos.google.cloud.retail.v2alpha.IListCatalogsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2alpha.ICatalog
- >
- ): void;
- listCatalogs(
- request: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
- | protos.google.cloud.retail.v2alpha.IListCatalogsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2alpha.ICatalog
- >
- ): void;
/**
* Lists all the {@link google.cloud.retail.v2alpha.Catalog|Catalog}s associated
* with the project.
@@ -742,6 +711,37 @@ export class CatalogServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listCatalogs(
+ request?: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2alpha.ICatalog[],
+ protos.google.cloud.retail.v2alpha.IListCatalogsRequest | null,
+ protos.google.cloud.retail.v2alpha.IListCatalogsResponse
+ ]
+ >;
+ listCatalogs(
+ request: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
+ | protos.google.cloud.retail.v2alpha.IListCatalogsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2alpha.ICatalog
+ >
+ ): void;
+ listCatalogs(
+ request: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
+ | protos.google.cloud.retail.v2alpha.IListCatalogsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2alpha.ICatalog
+ >
+ ): void;
listCatalogs(
request?: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
optionsOrCallback?:
@@ -888,11 +888,8 @@ export class CatalogServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listCatalogsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2alpha/catalog_service.list_catalogs.js
+ * region_tag:retail_v2alpha_generated_CatalogService_ListCatalogs_async
*/
listCatalogsAsync(
request?: protos.google.cloud.retail.v2alpha.IListCatalogsRequest,
@@ -906,7 +903,6 @@ export class CatalogServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listCatalogs'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts b/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts
index a0d87d38c11..428558ac04e 100644
--- a/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts
+++ b/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts
@@ -335,37 +335,6 @@ export class CompletionServiceClient {
// -------------------
// -- Service calls --
// -------------------
- completeQuery(
- request?: protos.google.cloud.retail.v2alpha.ICompleteQueryRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2alpha.ICompleteQueryResponse,
- protos.google.cloud.retail.v2alpha.ICompleteQueryRequest | undefined,
- {} | undefined
- ]
- >;
- completeQuery(
- request: protos.google.cloud.retail.v2alpha.ICompleteQueryRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.ICompleteQueryResponse,
- | protos.google.cloud.retail.v2alpha.ICompleteQueryRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- completeQuery(
- request: protos.google.cloud.retail.v2alpha.ICompleteQueryRequest,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.ICompleteQueryResponse,
- | protos.google.cloud.retail.v2alpha.ICompleteQueryRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Completes the specified prefix with keyword suggestions.
*
@@ -443,9 +412,40 @@ export class CompletionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.completeQuery(request);
+ * @example include:samples/generated/v2alpha/completion_service.complete_query.js
+ * region_tag:retail_v2alpha_generated_CompletionService_CompleteQuery_async
*/
+ completeQuery(
+ request?: protos.google.cloud.retail.v2alpha.ICompleteQueryRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2alpha.ICompleteQueryResponse,
+ protos.google.cloud.retail.v2alpha.ICompleteQueryRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ completeQuery(
+ request: protos.google.cloud.retail.v2alpha.ICompleteQueryRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.ICompleteQueryResponse,
+ | protos.google.cloud.retail.v2alpha.ICompleteQueryRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ completeQuery(
+ request: protos.google.cloud.retail.v2alpha.ICompleteQueryRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.ICompleteQueryResponse,
+ | protos.google.cloud.retail.v2alpha.ICompleteQueryRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
completeQuery(
request?: protos.google.cloud.retail.v2alpha.ICompleteQueryRequest,
optionsOrCallback?:
@@ -490,6 +490,41 @@ export class CompletionServiceClient {
return this.innerApiCalls.completeQuery(request, options, callback);
}
+ /**
+ * 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.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The catalog which the suggestions dataset belongs to.
+ *
+ * Format: `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2alpha.CompletionDataInputConfig} request.inputConfig
+ * Required. The desired input location of the data.
+ * @param {string} request.notificationPubsubTopic
+ * Pub/Sub topic for receiving notification. If this field is set,
+ * when the import is finished, a notification will be sent to
+ * specified Pub/Sub topic. The message data will be JSON string of a
+ * {@link google.longrunning.Operation|Operation}.
+ * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2alpha/completion_service.import_completion_data.js
+ * region_tag:retail_v2alpha_generated_CompletionService_ImportCompletionData_async
+ */
importCompletionData(
request?: protos.google.cloud.retail.v2alpha.IImportCompletionDataRequest,
options?: CallOptions
@@ -526,42 +561,6 @@ export class CompletionServiceClient {
{} | null | undefined
>
): void;
- /**
- * 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.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The catalog which the suggestions dataset belongs to.
- *
- * Format: `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2alpha.CompletionDataInputConfig} request.inputConfig
- * Required. The desired input location of the data.
- * @param {string} request.notificationPubsubTopic
- * Pub/Sub topic for receiving notification. If this field is set,
- * when the import is finished, a notification will be sent to
- * specified Pub/Sub topic. The message data will be JSON string of a
- * {@link google.longrunning.Operation|Operation}.
- * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.importCompletionData(request);
- * const [response] = await operation.promise();
- */
importCompletionData(
request?: protos.google.cloud.retail.v2alpha.IImportCompletionDataRequest,
optionsOrCallback?:
@@ -619,11 +618,8 @@ export class CompletionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportCompletionDataProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/completion_service.import_completion_data.js
+ * region_tag:retail_v2alpha_generated_CompletionService_ImportCompletionData_async
*/
async checkImportCompletionDataProgress(
name: string
diff --git a/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts b/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts
index a67a696e9ad..46349b02da0 100644
--- a/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts
+++ b/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts
@@ -294,33 +294,6 @@ export class PredictionServiceClient {
// -------------------
// -- Service calls --
// -------------------
- predict(
- request?: protos.google.cloud.retail.v2alpha.IPredictRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2alpha.IPredictResponse,
- protos.google.cloud.retail.v2alpha.IPredictRequest | undefined,
- {} | undefined
- ]
- >;
- predict(
- request: protos.google.cloud.retail.v2alpha.IPredictRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.IPredictResponse,
- protos.google.cloud.retail.v2alpha.IPredictRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- predict(
- request: protos.google.cloud.retail.v2alpha.IPredictRequest,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.IPredictResponse,
- protos.google.cloud.retail.v2alpha.IPredictRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Makes a recommendation prediction.
*
@@ -431,9 +404,36 @@ export class PredictionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.predict(request);
+ * @example include:samples/generated/v2alpha/prediction_service.predict.js
+ * region_tag:retail_v2alpha_generated_PredictionService_Predict_async
*/
+ predict(
+ request?: protos.google.cloud.retail.v2alpha.IPredictRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2alpha.IPredictResponse,
+ protos.google.cloud.retail.v2alpha.IPredictRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ predict(
+ request: protos.google.cloud.retail.v2alpha.IPredictRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.IPredictResponse,
+ protos.google.cloud.retail.v2alpha.IPredictRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ predict(
+ request: protos.google.cloud.retail.v2alpha.IPredictRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.IPredictResponse,
+ protos.google.cloud.retail.v2alpha.IPredictRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
predict(
request?: protos.google.cloud.retail.v2alpha.IPredictRequest,
optionsOrCallback?:
diff --git a/packages/google-cloud-retail/src/v2alpha/product_service_client.ts b/packages/google-cloud-retail/src/v2alpha/product_service_client.ts
index f9dca65909b..51778d106b8 100644
--- a/packages/google-cloud-retail/src/v2alpha/product_service_client.ts
+++ b/packages/google-cloud-retail/src/v2alpha/product_service_client.ts
@@ -425,37 +425,6 @@ export class ProductServiceClient {
// -------------------
// -- Service calls --
// -------------------
- createProduct(
- request?: protos.google.cloud.retail.v2alpha.ICreateProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2alpha.IProduct,
- protos.google.cloud.retail.v2alpha.ICreateProductRequest | undefined,
- {} | undefined
- ]
- >;
- createProduct(
- request: protos.google.cloud.retail.v2alpha.ICreateProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.IProduct,
- | protos.google.cloud.retail.v2alpha.ICreateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- createProduct(
- request: protos.google.cloud.retail.v2alpha.ICreateProductRequest,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.IProduct,
- | protos.google.cloud.retail.v2alpha.ICreateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Creates a {@link google.cloud.retail.v2alpha.Product|Product}.
*
@@ -489,9 +458,40 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.createProduct(request);
+ * @example include:samples/generated/v2alpha/product_service.create_product.js
+ * region_tag:retail_v2alpha_generated_ProductService_CreateProduct_async
*/
+ createProduct(
+ request?: protos.google.cloud.retail.v2alpha.ICreateProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2alpha.IProduct,
+ protos.google.cloud.retail.v2alpha.ICreateProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ createProduct(
+ request: protos.google.cloud.retail.v2alpha.ICreateProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.IProduct,
+ | protos.google.cloud.retail.v2alpha.ICreateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ createProduct(
+ request: protos.google.cloud.retail.v2alpha.ICreateProductRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.IProduct,
+ | protos.google.cloud.retail.v2alpha.ICreateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
createProduct(
request?: protos.google.cloud.retail.v2alpha.ICreateProductRequest,
optionsOrCallback?:
@@ -535,6 +535,32 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.createProduct(request, options, callback);
}
+ /**
+ * Gets a {@link google.cloud.retail.v2alpha.Product|Product}.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.name
+ * Required. Full resource name of
+ * {@link google.cloud.retail.v2alpha.Product|Product}, such as
+ * `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
+ *
+ * If the caller does not have permission to access the
+ * {@link google.cloud.retail.v2alpha.Product|Product}, regardless of whether or
+ * not it exists, a PERMISSION_DENIED error is returned.
+ *
+ * If the requested {@link google.cloud.retail.v2alpha.Product|Product} does not
+ * exist, a NOT_FOUND error is returned.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [Product]{@link google.cloud.retail.v2alpha.Product}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2alpha/product_service.get_product.js
+ * region_tag:retail_v2alpha_generated_ProductService_GetProduct_async
+ */
getProduct(
request?: protos.google.cloud.retail.v2alpha.IGetProductRequest,
options?: CallOptions
@@ -562,32 +588,6 @@ export class ProductServiceClient {
{} | null | undefined
>
): void;
- /**
- * Gets a {@link google.cloud.retail.v2alpha.Product|Product}.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.name
- * Required. Full resource name of
- * {@link google.cloud.retail.v2alpha.Product|Product}, such as
- * `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
- *
- * If the caller does not have permission to access the
- * {@link google.cloud.retail.v2alpha.Product|Product}, regardless of whether or
- * not it exists, a PERMISSION_DENIED error is returned.
- *
- * If the requested {@link google.cloud.retail.v2alpha.Product|Product} does not
- * exist, a NOT_FOUND error is returned.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [Product]{@link google.cloud.retail.v2alpha.Product}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getProduct(request);
- */
getProduct(
request?: protos.google.cloud.retail.v2alpha.IGetProductRequest,
optionsOrCallback?:
@@ -629,37 +629,6 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.getProduct(request, options, callback);
}
- updateProduct(
- request?: protos.google.cloud.retail.v2alpha.IUpdateProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2alpha.IProduct,
- protos.google.cloud.retail.v2alpha.IUpdateProductRequest | undefined,
- {} | undefined
- ]
- >;
- updateProduct(
- request: protos.google.cloud.retail.v2alpha.IUpdateProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.IProduct,
- | protos.google.cloud.retail.v2alpha.IUpdateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- updateProduct(
- request: protos.google.cloud.retail.v2alpha.IUpdateProductRequest,
- callback: Callback<
- protos.google.cloud.retail.v2alpha.IProduct,
- | protos.google.cloud.retail.v2alpha.IUpdateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Updates a {@link google.cloud.retail.v2alpha.Product|Product}.
*
@@ -695,9 +664,40 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.updateProduct(request);
+ * @example include:samples/generated/v2alpha/product_service.update_product.js
+ * region_tag:retail_v2alpha_generated_ProductService_UpdateProduct_async
*/
+ updateProduct(
+ request?: protos.google.cloud.retail.v2alpha.IUpdateProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2alpha.IProduct,
+ protos.google.cloud.retail.v2alpha.IUpdateProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ updateProduct(
+ request: protos.google.cloud.retail.v2alpha.IUpdateProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.IProduct,
+ | protos.google.cloud.retail.v2alpha.IUpdateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ updateProduct(
+ request: protos.google.cloud.retail.v2alpha.IUpdateProductRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2alpha.IProduct,
+ | protos.google.cloud.retail.v2alpha.IUpdateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
updateProduct(
request?: protos.google.cloud.retail.v2alpha.IUpdateProductRequest,
optionsOrCallback?:
@@ -741,37 +741,6 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.updateProduct(request, options, callback);
}
- deleteProduct(
- request?: protos.google.cloud.retail.v2alpha.IDeleteProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2alpha.IDeleteProductRequest | undefined,
- {} | undefined
- ]
- >;
- deleteProduct(
- request: protos.google.cloud.retail.v2alpha.IDeleteProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2alpha.IDeleteProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- deleteProduct(
- request: protos.google.cloud.retail.v2alpha.IDeleteProductRequest,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2alpha.IDeleteProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Deletes a {@link google.cloud.retail.v2alpha.Product|Product}.
*
@@ -807,9 +776,40 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.deleteProduct(request);
+ * @example include:samples/generated/v2alpha/product_service.delete_product.js
+ * region_tag:retail_v2alpha_generated_ProductService_DeleteProduct_async
*/
+ deleteProduct(
+ request?: protos.google.cloud.retail.v2alpha.IDeleteProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2alpha.IDeleteProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ deleteProduct(
+ request: protos.google.cloud.retail.v2alpha.IDeleteProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2alpha.IDeleteProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ deleteProduct(
+ request: protos.google.cloud.retail.v2alpha.IDeleteProductRequest,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2alpha.IDeleteProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
deleteProduct(
request?: protos.google.cloud.retail.v2alpha.IDeleteProductRequest,
optionsOrCallback?:
@@ -854,42 +854,6 @@ export class ProductServiceClient {
return this.innerApiCalls.deleteProduct(request, options, callback);
}
- importProducts(
- request?: protos.google.cloud.retail.v2alpha.IImportProductsRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2alpha.IImportProductsResponse,
- protos.google.cloud.retail.v2alpha.IImportMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- importProducts(
- request: protos.google.cloud.retail.v2alpha.IImportProductsRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IImportProductsResponse,
- protos.google.cloud.retail.v2alpha.IImportMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- importProducts(
- request: protos.google.cloud.retail.v2alpha.IImportProductsRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IImportProductsResponse,
- protos.google.cloud.retail.v2alpha.IImportMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Bulk import of multiple {@link google.cloud.retail.v2alpha.Product|Product}s.
*
@@ -947,10 +911,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.importProducts(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2alpha/product_service.import_products.js
+ * region_tag:retail_v2alpha_generated_ProductService_ImportProducts_async
*/
+ importProducts(
+ request?: protos.google.cloud.retail.v2alpha.IImportProductsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IImportProductsResponse,
+ protos.google.cloud.retail.v2alpha.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ importProducts(
+ request: protos.google.cloud.retail.v2alpha.IImportProductsRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IImportProductsResponse,
+ protos.google.cloud.retail.v2alpha.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ importProducts(
+ request: protos.google.cloud.retail.v2alpha.IImportProductsRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IImportProductsResponse,
+ protos.google.cloud.retail.v2alpha.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
importProducts(
request?: protos.google.cloud.retail.v2alpha.IImportProductsRequest,
optionsOrCallback?:
@@ -1008,11 +1007,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportProductsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/product_service.import_products.js
+ * region_tag:retail_v2alpha_generated_ProductService_ImportProducts_async
*/
async checkImportProductsProgress(
name: string
@@ -1036,42 +1032,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2alpha.ImportMetadata
>;
}
- setInventory(
- request?: protos.google.cloud.retail.v2alpha.ISetInventoryRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2alpha.ISetInventoryResponse,
- protos.google.cloud.retail.v2alpha.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- setInventory(
- request: protos.google.cloud.retail.v2alpha.ISetInventoryRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.ISetInventoryResponse,
- protos.google.cloud.retail.v2alpha.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- setInventory(
- request: protos.google.cloud.retail.v2alpha.ISetInventoryRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.ISetInventoryResponse,
- protos.google.cloud.retail.v2alpha.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Updates inventory information for a
* {@link google.cloud.retail.v2alpha.Product|Product} while respecting the last
@@ -1181,10 +1141,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.setInventory(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2alpha/product_service.set_inventory.js
+ * region_tag:retail_v2alpha_generated_ProductService_SetInventory_async
*/
+ setInventory(
+ request?: protos.google.cloud.retail.v2alpha.ISetInventoryRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2alpha.ISetInventoryResponse,
+ protos.google.cloud.retail.v2alpha.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ setInventory(
+ request: protos.google.cloud.retail.v2alpha.ISetInventoryRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.ISetInventoryResponse,
+ protos.google.cloud.retail.v2alpha.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ setInventory(
+ request: protos.google.cloud.retail.v2alpha.ISetInventoryRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.ISetInventoryResponse,
+ protos.google.cloud.retail.v2alpha.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
setInventory(
request?: protos.google.cloud.retail.v2alpha.ISetInventoryRequest,
optionsOrCallback?:
@@ -1242,11 +1237,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkSetInventoryProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/product_service.set_inventory.js
+ * region_tag:retail_v2alpha_generated_ProductService_SetInventory_async
*/
async checkSetInventoryProgress(
name: string
@@ -1270,42 +1262,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2alpha.SetInventoryMetadata
>;
}
- addFulfillmentPlaces(
- request?: protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- addFulfillmentPlaces(
- request: protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- addFulfillmentPlaces(
- request: protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Incrementally adds place IDs to
* {@link google.cloud.retail.v2alpha.FulfillmentInfo.place_ids|Product.fulfillment_info.place_ids}.
@@ -1389,10 +1345,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.addFulfillmentPlaces(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2alpha/product_service.add_fulfillment_places.js
+ * region_tag:retail_v2alpha_generated_ProductService_AddFulfillmentPlaces_async
*/
+ addFulfillmentPlaces(
+ request?: protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ addFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ addFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
addFulfillmentPlaces(
request?: protos.google.cloud.retail.v2alpha.IAddFulfillmentPlacesRequest,
optionsOrCallback?:
@@ -1450,11 +1441,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkAddFulfillmentPlacesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/product_service.add_fulfillment_places.js
+ * region_tag:retail_v2alpha_generated_ProductService_AddFulfillmentPlaces_async
*/
async checkAddFulfillmentPlacesProgress(
name: string
@@ -1465,55 +1453,19 @@ export class ProductServiceClient {
>
> {
const request = new operationsProtos.google.longrunning.GetOperationRequest(
- {name}
- );
- const [operation] = await this.operationsClient.getOperation(request);
- const decodeOperation = new gax.Operation(
- operation,
- this.descriptors.longrunning.addFulfillmentPlaces,
- gax.createDefaultBackoffSettings()
- );
- return decodeOperation as LROperation<
- protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata
- >;
- }
- removeFulfillmentPlaces(
- request?: protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- removeFulfillmentPlaces(
- request: protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- removeFulfillmentPlaces(
- request: protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
+ {name}
+ );
+ const [operation] = await this.operationsClient.getOperation(request);
+ const decodeOperation = new gax.Operation(
+ operation,
+ this.descriptors.longrunning.addFulfillmentPlaces,
+ gax.createDefaultBackoffSettings()
+ );
+ return decodeOperation as LROperation<
+ protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata
+ >;
+ }
/**
* Incrementally removes place IDs from a
* {@link google.cloud.retail.v2alpha.FulfillmentInfo.place_ids|Product.fulfillment_info.place_ids}.
@@ -1592,10 +1544,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.removeFulfillmentPlaces(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2alpha/product_service.remove_fulfillment_places.js
+ * region_tag:retail_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_async
*/
+ removeFulfillmentPlaces(
+ request?: protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ removeFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ removeFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
removeFulfillmentPlaces(
request?: protos.google.cloud.retail.v2alpha.IRemoveFulfillmentPlacesRequest,
optionsOrCallback?:
@@ -1657,11 +1644,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkRemoveFulfillmentPlacesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/product_service.remove_fulfillment_places.js
+ * region_tag:retail_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_async
*/
async checkRemoveFulfillmentPlacesProgress(
name: string
@@ -1685,42 +1669,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata
>;
}
- addLocalInventories(
- request?: protos.google.cloud.retail.v2alpha.IAddLocalInventoriesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2alpha.IAddLocalInventoriesResponse,
- protos.google.cloud.retail.v2alpha.IAddLocalInventoriesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- addLocalInventories(
- request: protos.google.cloud.retail.v2alpha.IAddLocalInventoriesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IAddLocalInventoriesResponse,
- protos.google.cloud.retail.v2alpha.IAddLocalInventoriesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- addLocalInventories(
- request: protos.google.cloud.retail.v2alpha.IAddLocalInventoriesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IAddLocalInventoriesResponse,
- protos.google.cloud.retail.v2alpha.IAddLocalInventoriesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Updates local inventory information for a
* {@link google.cloud.retail.v2alpha.Product|Product} at a list of places, while
@@ -1795,10 +1743,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.addLocalInventories(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2alpha/product_service.add_local_inventories.js
+ * region_tag:retail_v2alpha_generated_ProductService_AddLocalInventories_async
*/
+ addLocalInventories(
+ request?: protos.google.cloud.retail.v2alpha.IAddLocalInventoriesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IAddLocalInventoriesResponse,
+ protos.google.cloud.retail.v2alpha.IAddLocalInventoriesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ addLocalInventories(
+ request: protos.google.cloud.retail.v2alpha.IAddLocalInventoriesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IAddLocalInventoriesResponse,
+ protos.google.cloud.retail.v2alpha.IAddLocalInventoriesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ addLocalInventories(
+ request: protos.google.cloud.retail.v2alpha.IAddLocalInventoriesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IAddLocalInventoriesResponse,
+ protos.google.cloud.retail.v2alpha.IAddLocalInventoriesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
addLocalInventories(
request?: protos.google.cloud.retail.v2alpha.IAddLocalInventoriesRequest,
optionsOrCallback?:
@@ -1856,11 +1839,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkAddLocalInventoriesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/product_service.add_local_inventories.js
+ * region_tag:retail_v2alpha_generated_ProductService_AddLocalInventories_async
*/
async checkAddLocalInventoriesProgress(
name: string
@@ -1884,42 +1864,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata
>;
}
- removeLocalInventories(
- request?: protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesResponse,
- protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- removeLocalInventories(
- request: protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesResponse,
- protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- removeLocalInventories(
- request: protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesResponse,
- protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Remove local inventory information for a
* {@link google.cloud.retail.v2alpha.Product|Product} at a list of places at a
@@ -1975,10 +1919,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.removeLocalInventories(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2alpha/product_service.remove_local_inventories.js
+ * region_tag:retail_v2alpha_generated_ProductService_RemoveLocalInventories_async
*/
+ removeLocalInventories(
+ request?: protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesResponse,
+ protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ removeLocalInventories(
+ request: protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesResponse,
+ protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ removeLocalInventories(
+ request: protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesResponse,
+ protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
removeLocalInventories(
request?: protos.google.cloud.retail.v2alpha.IRemoveLocalInventoriesRequest,
optionsOrCallback?:
@@ -2040,11 +2019,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkRemoveLocalInventoriesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/product_service.remove_local_inventories.js
+ * region_tag:retail_v2alpha_generated_ProductService_RemoveLocalInventories_async
*/
async checkRemoveLocalInventoriesProgress(
name: string
@@ -2068,37 +2044,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata
>;
}
- listProducts(
- request?: protos.google.cloud.retail.v2alpha.IListProductsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2alpha.IProduct[],
- protos.google.cloud.retail.v2alpha.IListProductsRequest | null,
- protos.google.cloud.retail.v2alpha.IListProductsResponse
- ]
- >;
- listProducts(
- request: protos.google.cloud.retail.v2alpha.IListProductsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2alpha.IListProductsRequest,
- | protos.google.cloud.retail.v2alpha.IListProductsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2alpha.IProduct
- >
- ): void;
- listProducts(
- request: protos.google.cloud.retail.v2alpha.IListProductsRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2alpha.IListProductsRequest,
- | protos.google.cloud.retail.v2alpha.IListProductsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2alpha.IProduct
- >
- ): void;
/**
* Gets a list of {@link google.cloud.retail.v2alpha.Product|Product}s.
*
@@ -2200,6 +2145,37 @@ export class ProductServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listProducts(
+ request?: protos.google.cloud.retail.v2alpha.IListProductsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2alpha.IProduct[],
+ protos.google.cloud.retail.v2alpha.IListProductsRequest | null,
+ protos.google.cloud.retail.v2alpha.IListProductsResponse
+ ]
+ >;
+ listProducts(
+ request: protos.google.cloud.retail.v2alpha.IListProductsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2alpha.IListProductsRequest,
+ | protos.google.cloud.retail.v2alpha.IListProductsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2alpha.IProduct
+ >
+ ): void;
+ listProducts(
+ request: protos.google.cloud.retail.v2alpha.IListProductsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2alpha.IListProductsRequest,
+ | protos.google.cloud.retail.v2alpha.IListProductsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2alpha.IProduct
+ >
+ ): void;
listProducts(
request?: protos.google.cloud.retail.v2alpha.IListProductsRequest,
optionsOrCallback?:
@@ -2464,11 +2440,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listProductsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2alpha/product_service.list_products.js
+ * region_tag:retail_v2alpha_generated_ProductService_ListProducts_async
*/
listProductsAsync(
request?: protos.google.cloud.retail.v2alpha.IListProductsRequest,
@@ -2482,7 +2455,6 @@ export class ProductServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listProducts'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2alpha/search_service_client.ts b/packages/google-cloud-retail/src/v2alpha/search_service_client.ts
index 7322541eb8e..26fbaff142d 100644
--- a/packages/google-cloud-retail/src/v2alpha/search_service_client.ts
+++ b/packages/google-cloud-retail/src/v2alpha/search_service_client.ts
@@ -322,33 +322,6 @@ export class SearchServiceClient {
// -- Service calls --
// -------------------
- search(
- request?: protos.google.cloud.retail.v2alpha.ISearchRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2alpha.SearchResponse.ISearchResult[],
- protos.google.cloud.retail.v2alpha.ISearchRequest | null,
- protos.google.cloud.retail.v2alpha.ISearchResponse
- ]
- >;
- search(
- request: protos.google.cloud.retail.v2alpha.ISearchRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2alpha.ISearchRequest,
- protos.google.cloud.retail.v2alpha.ISearchResponse | null | undefined,
- protos.google.cloud.retail.v2alpha.SearchResponse.ISearchResult
- >
- ): void;
- search(
- request: protos.google.cloud.retail.v2alpha.ISearchRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2alpha.ISearchRequest,
- protos.google.cloud.retail.v2alpha.ISearchResponse | null | undefined,
- protos.google.cloud.retail.v2alpha.SearchResponse.ISearchResult
- >
- ): void;
/**
* Performs a search.
*
@@ -569,6 +542,33 @@ export class SearchServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ search(
+ request?: protos.google.cloud.retail.v2alpha.ISearchRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2alpha.SearchResponse.ISearchResult[],
+ protos.google.cloud.retail.v2alpha.ISearchRequest | null,
+ protos.google.cloud.retail.v2alpha.ISearchResponse
+ ]
+ >;
+ search(
+ request: protos.google.cloud.retail.v2alpha.ISearchRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2alpha.ISearchRequest,
+ protos.google.cloud.retail.v2alpha.ISearchResponse | null | undefined,
+ protos.google.cloud.retail.v2alpha.SearchResponse.ISearchResult
+ >
+ ): void;
+ search(
+ request: protos.google.cloud.retail.v2alpha.ISearchRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2alpha.ISearchRequest,
+ protos.google.cloud.retail.v2alpha.ISearchResponse | null | undefined,
+ protos.google.cloud.retail.v2alpha.SearchResponse.ISearchResult
+ >
+ ): void;
search(
request?: protos.google.cloud.retail.v2alpha.ISearchRequest,
optionsOrCallback?:
@@ -1059,11 +1059,8 @@ export class SearchServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.searchAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2alpha/search_service.search.js
+ * region_tag:retail_v2alpha_generated_SearchService_Search_async
*/
searchAsync(
request?: protos.google.cloud.retail.v2alpha.ISearchRequest,
@@ -1077,7 +1074,6 @@ export class SearchServiceClient {
gax.routingHeader.fromParams({
placement: request.placement || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['search'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts b/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts
index 785f8e7d411..6092fdc96f7 100644
--- a/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts
+++ b/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts
@@ -356,6 +356,26 @@ export class UserEventServiceClient {
// -------------------
// -- Service calls --
// -------------------
+ /**
+ * Writes a single user event.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The parent catalog resource name, such as
+ * `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2alpha.UserEvent} request.userEvent
+ * Required. User event to write.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [UserEvent]{@link google.cloud.retail.v2alpha.UserEvent}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2alpha/user_event_service.write_user_event.js
+ * region_tag:retail_v2alpha_generated_UserEventService_WriteUserEvent_async
+ */
writeUserEvent(
request?: protos.google.cloud.retail.v2alpha.IWriteUserEventRequest,
options?: CallOptions
@@ -387,26 +407,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Writes a single user event.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The parent catalog resource name, such as
- * `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2alpha.UserEvent} request.userEvent
- * Required. User event to write.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [UserEvent]{@link google.cloud.retail.v2alpha.UserEvent}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.writeUserEvent(request);
- */
writeUserEvent(
request?: protos.google.cloud.retail.v2alpha.IWriteUserEventRequest,
optionsOrCallback?:
@@ -450,37 +450,6 @@ export class UserEventServiceClient {
this.initialize();
return this.innerApiCalls.writeUserEvent(request, options, callback);
}
- collectUserEvent(
- request?: protos.google.cloud.retail.v2alpha.ICollectUserEventRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.api.IHttpBody,
- protos.google.cloud.retail.v2alpha.ICollectUserEventRequest | undefined,
- {} | undefined
- ]
- >;
- collectUserEvent(
- request: protos.google.cloud.retail.v2alpha.ICollectUserEventRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.api.IHttpBody,
- | protos.google.cloud.retail.v2alpha.ICollectUserEventRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- collectUserEvent(
- request: protos.google.cloud.retail.v2alpha.ICollectUserEventRequest,
- callback: Callback<
- protos.google.api.IHttpBody,
- | protos.google.cloud.retail.v2alpha.ICollectUserEventRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Writes a single user event from the browser. This uses a GET request to
* due to browser restriction of POST-ing to a 3rd party domain.
@@ -512,9 +481,40 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.collectUserEvent(request);
+ * @example include:samples/generated/v2alpha/user_event_service.collect_user_event.js
+ * region_tag:retail_v2alpha_generated_UserEventService_CollectUserEvent_async
*/
+ collectUserEvent(
+ request?: protos.google.cloud.retail.v2alpha.ICollectUserEventRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.api.IHttpBody,
+ protos.google.cloud.retail.v2alpha.ICollectUserEventRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ collectUserEvent(
+ request: protos.google.cloud.retail.v2alpha.ICollectUserEventRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.api.IHttpBody,
+ | protos.google.cloud.retail.v2alpha.ICollectUserEventRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ collectUserEvent(
+ request: protos.google.cloud.retail.v2alpha.ICollectUserEventRequest,
+ callback: Callback<
+ protos.google.api.IHttpBody,
+ | protos.google.cloud.retail.v2alpha.ICollectUserEventRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
collectUserEvent(
request?: protos.google.cloud.retail.v2alpha.ICollectUserEventRequest,
optionsOrCallback?:
@@ -559,42 +559,6 @@ export class UserEventServiceClient {
return this.innerApiCalls.collectUserEvent(request, options, callback);
}
- purgeUserEvents(
- request?: protos.google.cloud.retail.v2alpha.IPurgeUserEventsRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2alpha.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2alpha.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- purgeUserEvents(
- request: protos.google.cloud.retail.v2alpha.IPurgeUserEventsRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2alpha.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- purgeUserEvents(
- request: protos.google.cloud.retail.v2alpha.IPurgeUserEventsRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2alpha.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2alpha.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Deletes permanently all user events specified by the filter provided.
* Depending on the number of events specified by the filter, this operation
@@ -645,10 +609,45 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.purgeUserEvents(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2alpha/user_event_service.purge_user_events.js
+ * region_tag:retail_v2alpha_generated_UserEventService_PurgeUserEvents_async
*/
+ purgeUserEvents(
+ request?: protos.google.cloud.retail.v2alpha.IPurgeUserEventsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2alpha.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ purgeUserEvents(
+ request: protos.google.cloud.retail.v2alpha.IPurgeUserEventsRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2alpha.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ purgeUserEvents(
+ request: protos.google.cloud.retail.v2alpha.IPurgeUserEventsRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2alpha.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2alpha.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
purgeUserEvents(
request?: protos.google.cloud.retail.v2alpha.IPurgeUserEventsRequest,
optionsOrCallback?:
@@ -706,11 +705,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkPurgeUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/user_event_service.purge_user_events.js
+ * region_tag:retail_v2alpha_generated_UserEventService_PurgeUserEvents_async
*/
async checkPurgeUserEventsProgress(
name: string
@@ -734,6 +730,36 @@ export class UserEventServiceClient {
protos.google.cloud.retail.v2alpha.PurgeMetadata
>;
}
+ /**
+ * Bulk import of User events. Request processing might be
+ * synchronous. Events that already exist are skipped.
+ * Use this method for backfilling historical user events.
+ *
+ * Operation.response is of type ImportResponse. Note that it is
+ * possible for a subset of the items to be successfully inserted.
+ * Operation.metadata is of type ImportMetadata.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. `projects/1234/locations/global/catalogs/default_catalog`
+ * @param {google.cloud.retail.v2alpha.UserEventInputConfig} request.inputConfig
+ * Required. The desired input location of the data.
+ * @param {google.cloud.retail.v2alpha.ImportErrorsConfig} request.errorsConfig
+ * The desired location of errors incurred during the Import. Cannot be set
+ * for inline user event imports.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2alpha/user_event_service.import_user_events.js
+ * region_tag:retail_v2alpha_generated_UserEventService_ImportUserEvents_async
+ */
importUserEvents(
request?: protos.google.cloud.retail.v2alpha.IImportUserEventsRequest,
options?: CallOptions
@@ -770,37 +796,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Bulk import of User events. Request processing might be
- * synchronous. Events that already exist are skipped.
- * Use this method for backfilling historical user events.
- *
- * Operation.response is of type ImportResponse. Note that it is
- * possible for a subset of the items to be successfully inserted.
- * Operation.metadata is of type ImportMetadata.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. `projects/1234/locations/global/catalogs/default_catalog`
- * @param {google.cloud.retail.v2alpha.UserEventInputConfig} request.inputConfig
- * Required. The desired input location of the data.
- * @param {google.cloud.retail.v2alpha.ImportErrorsConfig} request.errorsConfig
- * The desired location of errors incurred during the Import. Cannot be set
- * for inline user event imports.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.importUserEvents(request);
- * const [response] = await operation.promise();
- */
importUserEvents(
request?: protos.google.cloud.retail.v2alpha.IImportUserEventsRequest,
optionsOrCallback?:
@@ -858,11 +853,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/user_event_service.import_user_events.js
+ * region_tag:retail_v2alpha_generated_UserEventService_ImportUserEvents_async
*/
async checkImportUserEventsProgress(
name: string
@@ -886,6 +878,37 @@ export class UserEventServiceClient {
protos.google.cloud.retail.v2alpha.ImportMetadata
>;
}
+ /**
+ * Triggers 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 API can be used to trigger a 'join' operation on specified
+ * events with latest version of product catalog. It can also be used to
+ * correct events joined with wrong product catalog.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The parent catalog resource name, such as
+ * `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2alpha.RejoinUserEventsRequest.UserEventRejoinScope} request.userEventRejoinScope
+ * The type of the user event rejoin to define the scope and range of the user
+ * events to be rejoined with the latest product catalog. Defaults to
+ * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
+ * invalid integer value.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2alpha/user_event_service.rejoin_user_events.js
+ * region_tag:retail_v2alpha_generated_UserEventService_RejoinUserEvents_async
+ */
rejoinUserEvents(
request?: protos.google.cloud.retail.v2alpha.IRejoinUserEventsRequest,
options?: CallOptions
@@ -922,38 +945,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Triggers 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 API can be used to trigger a 'join' operation on specified
- * events with latest version of product catalog. It can also be used to
- * correct events joined with wrong product catalog.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The parent catalog resource name, such as
- * `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2alpha.RejoinUserEventsRequest.UserEventRejoinScope} request.userEventRejoinScope
- * The type of the user event rejoin to define the scope and range of the user
- * events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.rejoinUserEvents(request);
- * const [response] = await operation.promise();
- */
rejoinUserEvents(
request?: protos.google.cloud.retail.v2alpha.IRejoinUserEventsRequest,
optionsOrCallback?:
@@ -1011,11 +1002,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkRejoinUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2alpha/user_event_service.rejoin_user_events.js
+ * region_tag:retail_v2alpha_generated_UserEventService_RejoinUserEvents_async
*/
async checkRejoinUserEventsProgress(
name: string
diff --git a/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts b/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts
index add23f8f3b7..b490b61567b 100644
--- a/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts
+++ b/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts
@@ -325,6 +325,36 @@ export class CatalogServiceClient {
// -------------------
// -- Service calls --
// -------------------
+ /**
+ * Updates the {@link google.cloud.retail.v2beta.Catalog|Catalog}s.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {google.cloud.retail.v2beta.Catalog} request.catalog
+ * Required. The {@link google.cloud.retail.v2beta.Catalog|Catalog} to update.
+ *
+ * If the caller does not have permission to update the
+ * {@link google.cloud.retail.v2beta.Catalog|Catalog}, regardless of whether or not
+ * it exists, a PERMISSION_DENIED error is returned.
+ *
+ * If the {@link google.cloud.retail.v2beta.Catalog|Catalog} to update does not
+ * exist, a NOT_FOUND error is returned.
+ * @param {google.protobuf.FieldMask} request.updateMask
+ * Indicates which fields in the provided
+ * {@link google.cloud.retail.v2beta.Catalog|Catalog} to update.
+ *
+ * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
+ * is returned.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [Catalog]{@link google.cloud.retail.v2beta.Catalog}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2beta/catalog_service.update_catalog.js
+ * region_tag:retail_v2beta_generated_CatalogService_UpdateCatalog_async
+ */
updateCatalog(
request?: protos.google.cloud.retail.v2beta.IUpdateCatalogRequest,
options?: CallOptions
@@ -356,36 +386,6 @@ export class CatalogServiceClient {
{} | null | undefined
>
): void;
- /**
- * Updates the {@link google.cloud.retail.v2beta.Catalog|Catalog}s.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {google.cloud.retail.v2beta.Catalog} request.catalog
- * Required. The {@link google.cloud.retail.v2beta.Catalog|Catalog} to update.
- *
- * If the caller does not have permission to update the
- * {@link google.cloud.retail.v2beta.Catalog|Catalog}, regardless of whether or not
- * it exists, a PERMISSION_DENIED error is returned.
- *
- * If the {@link google.cloud.retail.v2beta.Catalog|Catalog} to update does not
- * exist, a NOT_FOUND error is returned.
- * @param {google.protobuf.FieldMask} request.updateMask
- * Indicates which fields in the provided
- * {@link google.cloud.retail.v2beta.Catalog|Catalog} to update.
- *
- * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
- * is returned.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [Catalog]{@link google.cloud.retail.v2beta.Catalog}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.updateCatalog(request);
- */
updateCatalog(
request?: protos.google.cloud.retail.v2beta.IUpdateCatalogRequest,
optionsOrCallback?:
@@ -429,37 +429,6 @@ export class CatalogServiceClient {
this.initialize();
return this.innerApiCalls.updateCatalog(request, options, callback);
}
- setDefaultBranch(
- request?: protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest | undefined,
- {} | undefined
- ]
- >;
- setDefaultBranch(
- request: protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- setDefaultBranch(
- request: protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Set a specified branch id as default branch. API methods such as
* {@link google.cloud.retail.v2beta.SearchService.Search|SearchService.Search},
@@ -523,9 +492,40 @@ export class CatalogServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.setDefaultBranch(request);
+ * @example include:samples/generated/v2beta/catalog_service.set_default_branch.js
+ * region_tag:retail_v2beta_generated_CatalogService_SetDefaultBranch_async
*/
+ setDefaultBranch(
+ request?: protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ setDefaultBranch(
+ request: protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ setDefaultBranch(
+ request: protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
setDefaultBranch(
request?: protos.google.cloud.retail.v2beta.ISetDefaultBranchRequest,
optionsOrCallback?:
@@ -569,6 +569,30 @@ export class CatalogServiceClient {
this.initialize();
return this.innerApiCalls.setDefaultBranch(request, options, callback);
}
+ /**
+ * Get which branch is currently default branch set by
+ * {@link google.cloud.retail.v2beta.CatalogService.SetDefaultBranch|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.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.catalog
+ * The parent catalog resource name, such as
+ * `projects/* /locations/global/catalogs/default_catalog`.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [GetDefaultBranchResponse]{@link google.cloud.retail.v2beta.GetDefaultBranchResponse}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2beta/catalog_service.get_default_branch.js
+ * region_tag:retail_v2beta_generated_CatalogService_GetDefaultBranch_async
+ */
getDefaultBranch(
request?: protos.google.cloud.retail.v2beta.IGetDefaultBranchRequest,
options?: CallOptions
@@ -600,30 +624,6 @@ export class CatalogServiceClient {
{} | null | undefined
>
): void;
- /**
- * Get which branch is currently default branch set by
- * {@link google.cloud.retail.v2beta.CatalogService.SetDefaultBranch|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.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.catalog
- * The parent catalog resource name, such as
- * `projects/* /locations/global/catalogs/default_catalog`.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [GetDefaultBranchResponse]{@link google.cloud.retail.v2beta.GetDefaultBranchResponse}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getDefaultBranch(request);
- */
getDefaultBranch(
request?: protos.google.cloud.retail.v2beta.IGetDefaultBranchRequest,
optionsOrCallback?:
@@ -668,37 +668,6 @@ export class CatalogServiceClient {
return this.innerApiCalls.getDefaultBranch(request, options, callback);
}
- listCatalogs(
- request?: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2beta.ICatalog[],
- protos.google.cloud.retail.v2beta.IListCatalogsRequest | null,
- protos.google.cloud.retail.v2beta.IListCatalogsResponse
- ]
- >;
- listCatalogs(
- request: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2beta.IListCatalogsRequest,
- | protos.google.cloud.retail.v2beta.IListCatalogsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2beta.ICatalog
- >
- ): void;
- listCatalogs(
- request: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2beta.IListCatalogsRequest,
- | protos.google.cloud.retail.v2beta.IListCatalogsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2beta.ICatalog
- >
- ): void;
/**
* Lists all the {@link google.cloud.retail.v2beta.Catalog|Catalog}s associated
* with the project.
@@ -742,6 +711,37 @@ export class CatalogServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listCatalogs(
+ request?: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2beta.ICatalog[],
+ protos.google.cloud.retail.v2beta.IListCatalogsRequest | null,
+ protos.google.cloud.retail.v2beta.IListCatalogsResponse
+ ]
+ >;
+ listCatalogs(
+ request: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2beta.IListCatalogsRequest,
+ | protos.google.cloud.retail.v2beta.IListCatalogsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2beta.ICatalog
+ >
+ ): void;
+ listCatalogs(
+ request: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2beta.IListCatalogsRequest,
+ | protos.google.cloud.retail.v2beta.IListCatalogsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2beta.ICatalog
+ >
+ ): void;
listCatalogs(
request?: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
optionsOrCallback?:
@@ -888,11 +888,8 @@ export class CatalogServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listCatalogsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2beta/catalog_service.list_catalogs.js
+ * region_tag:retail_v2beta_generated_CatalogService_ListCatalogs_async
*/
listCatalogsAsync(
request?: protos.google.cloud.retail.v2beta.IListCatalogsRequest,
@@ -906,7 +903,6 @@ export class CatalogServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listCatalogs'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2beta/completion_service_client.ts b/packages/google-cloud-retail/src/v2beta/completion_service_client.ts
index 95b9b316cf4..2682fc469bb 100644
--- a/packages/google-cloud-retail/src/v2beta/completion_service_client.ts
+++ b/packages/google-cloud-retail/src/v2beta/completion_service_client.ts
@@ -335,37 +335,6 @@ export class CompletionServiceClient {
// -------------------
// -- Service calls --
// -------------------
- completeQuery(
- request?: protos.google.cloud.retail.v2beta.ICompleteQueryRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2beta.ICompleteQueryResponse,
- protos.google.cloud.retail.v2beta.ICompleteQueryRequest | undefined,
- {} | undefined
- ]
- >;
- completeQuery(
- request: protos.google.cloud.retail.v2beta.ICompleteQueryRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2beta.ICompleteQueryResponse,
- | protos.google.cloud.retail.v2beta.ICompleteQueryRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- completeQuery(
- request: protos.google.cloud.retail.v2beta.ICompleteQueryRequest,
- callback: Callback<
- protos.google.cloud.retail.v2beta.ICompleteQueryResponse,
- | protos.google.cloud.retail.v2beta.ICompleteQueryRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Completes the specified prefix with keyword suggestions.
*
@@ -442,9 +411,40 @@ export class CompletionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.completeQuery(request);
+ * @example include:samples/generated/v2beta/completion_service.complete_query.js
+ * region_tag:retail_v2beta_generated_CompletionService_CompleteQuery_async
*/
+ completeQuery(
+ request?: protos.google.cloud.retail.v2beta.ICompleteQueryRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2beta.ICompleteQueryResponse,
+ protos.google.cloud.retail.v2beta.ICompleteQueryRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ completeQuery(
+ request: protos.google.cloud.retail.v2beta.ICompleteQueryRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.ICompleteQueryResponse,
+ | protos.google.cloud.retail.v2beta.ICompleteQueryRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ completeQuery(
+ request: protos.google.cloud.retail.v2beta.ICompleteQueryRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.ICompleteQueryResponse,
+ | protos.google.cloud.retail.v2beta.ICompleteQueryRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
completeQuery(
request?: protos.google.cloud.retail.v2beta.ICompleteQueryRequest,
optionsOrCallback?:
@@ -489,6 +489,41 @@ export class CompletionServiceClient {
return this.innerApiCalls.completeQuery(request, options, callback);
}
+ /**
+ * 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.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The catalog which the suggestions dataset belongs to.
+ *
+ * Format: `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2beta.CompletionDataInputConfig} request.inputConfig
+ * Required. The desired input location of the data.
+ * @param {string} request.notificationPubsubTopic
+ * Pub/Sub topic for receiving notification. If this field is set,
+ * when the import is finished, a notification will be sent to
+ * specified Pub/Sub topic. The message data will be JSON string of a
+ * {@link google.longrunning.Operation|Operation}.
+ * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2beta/completion_service.import_completion_data.js
+ * region_tag:retail_v2beta_generated_CompletionService_ImportCompletionData_async
+ */
importCompletionData(
request?: protos.google.cloud.retail.v2beta.IImportCompletionDataRequest,
options?: CallOptions
@@ -525,42 +560,6 @@ export class CompletionServiceClient {
{} | null | undefined
>
): void;
- /**
- * 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.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The catalog which the suggestions dataset belongs to.
- *
- * Format: `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2beta.CompletionDataInputConfig} request.inputConfig
- * Required. The desired input location of the data.
- * @param {string} request.notificationPubsubTopic
- * Pub/Sub topic for receiving notification. If this field is set,
- * when the import is finished, a notification will be sent to
- * specified Pub/Sub topic. The message data will be JSON string of a
- * {@link google.longrunning.Operation|Operation}.
- * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.importCompletionData(request);
- * const [response] = await operation.promise();
- */
importCompletionData(
request?: protos.google.cloud.retail.v2beta.IImportCompletionDataRequest,
optionsOrCallback?:
@@ -618,11 +617,8 @@ export class CompletionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportCompletionDataProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/completion_service.import_completion_data.js
+ * region_tag:retail_v2beta_generated_CompletionService_ImportCompletionData_async
*/
async checkImportCompletionDataProgress(
name: string
diff --git a/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts b/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts
index 7e807132806..77ffb3cf587 100644
--- a/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts
+++ b/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts
@@ -294,33 +294,6 @@ export class PredictionServiceClient {
// -------------------
// -- Service calls --
// -------------------
- predict(
- request?: protos.google.cloud.retail.v2beta.IPredictRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2beta.IPredictResponse,
- protos.google.cloud.retail.v2beta.IPredictRequest | undefined,
- {} | undefined
- ]
- >;
- predict(
- request: protos.google.cloud.retail.v2beta.IPredictRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2beta.IPredictResponse,
- protos.google.cloud.retail.v2beta.IPredictRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
- predict(
- request: protos.google.cloud.retail.v2beta.IPredictRequest,
- callback: Callback<
- protos.google.cloud.retail.v2beta.IPredictResponse,
- protos.google.cloud.retail.v2beta.IPredictRequest | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Makes a recommendation prediction.
*
@@ -431,9 +404,36 @@ export class PredictionServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.predict(request);
+ * @example include:samples/generated/v2beta/prediction_service.predict.js
+ * region_tag:retail_v2beta_generated_PredictionService_Predict_async
*/
+ predict(
+ request?: protos.google.cloud.retail.v2beta.IPredictRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2beta.IPredictResponse,
+ protos.google.cloud.retail.v2beta.IPredictRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ predict(
+ request: protos.google.cloud.retail.v2beta.IPredictRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.IPredictResponse,
+ protos.google.cloud.retail.v2beta.IPredictRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ predict(
+ request: protos.google.cloud.retail.v2beta.IPredictRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.IPredictResponse,
+ protos.google.cloud.retail.v2beta.IPredictRequest | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
predict(
request?: protos.google.cloud.retail.v2beta.IPredictRequest,
optionsOrCallback?:
diff --git a/packages/google-cloud-retail/src/v2beta/product_service_client.ts b/packages/google-cloud-retail/src/v2beta/product_service_client.ts
index 696cdf040bc..fe721c55f3c 100644
--- a/packages/google-cloud-retail/src/v2beta/product_service_client.ts
+++ b/packages/google-cloud-retail/src/v2beta/product_service_client.ts
@@ -397,37 +397,6 @@ export class ProductServiceClient {
// -------------------
// -- Service calls --
// -------------------
- createProduct(
- request?: protos.google.cloud.retail.v2beta.ICreateProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2beta.IProduct,
- protos.google.cloud.retail.v2beta.ICreateProductRequest | undefined,
- {} | undefined
- ]
- >;
- createProduct(
- request: protos.google.cloud.retail.v2beta.ICreateProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2beta.IProduct,
- | protos.google.cloud.retail.v2beta.ICreateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- createProduct(
- request: protos.google.cloud.retail.v2beta.ICreateProductRequest,
- callback: Callback<
- protos.google.cloud.retail.v2beta.IProduct,
- | protos.google.cloud.retail.v2beta.ICreateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Creates a {@link google.cloud.retail.v2beta.Product|Product}.
*
@@ -461,9 +430,40 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.createProduct(request);
+ * @example include:samples/generated/v2beta/product_service.create_product.js
+ * region_tag:retail_v2beta_generated_ProductService_CreateProduct_async
*/
+ createProduct(
+ request?: protos.google.cloud.retail.v2beta.ICreateProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2beta.IProduct,
+ protos.google.cloud.retail.v2beta.ICreateProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ createProduct(
+ request: protos.google.cloud.retail.v2beta.ICreateProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.IProduct,
+ | protos.google.cloud.retail.v2beta.ICreateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ createProduct(
+ request: protos.google.cloud.retail.v2beta.ICreateProductRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.IProduct,
+ | protos.google.cloud.retail.v2beta.ICreateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
createProduct(
request?: protos.google.cloud.retail.v2beta.ICreateProductRequest,
optionsOrCallback?:
@@ -507,6 +507,32 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.createProduct(request, options, callback);
}
+ /**
+ * Gets a {@link google.cloud.retail.v2beta.Product|Product}.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.name
+ * Required. Full resource name of
+ * {@link google.cloud.retail.v2beta.Product|Product}, such as
+ * `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
+ *
+ * If the caller does not have permission to access the
+ * {@link google.cloud.retail.v2beta.Product|Product}, regardless of whether or not
+ * it exists, a PERMISSION_DENIED error is returned.
+ *
+ * If the requested {@link google.cloud.retail.v2beta.Product|Product} does not
+ * exist, a NOT_FOUND error is returned.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [Product]{@link google.cloud.retail.v2beta.Product}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2beta/product_service.get_product.js
+ * region_tag:retail_v2beta_generated_ProductService_GetProduct_async
+ */
getProduct(
request?: protos.google.cloud.retail.v2beta.IGetProductRequest,
options?: CallOptions
@@ -534,32 +560,6 @@ export class ProductServiceClient {
{} | null | undefined
>
): void;
- /**
- * Gets a {@link google.cloud.retail.v2beta.Product|Product}.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.name
- * Required. Full resource name of
- * {@link google.cloud.retail.v2beta.Product|Product}, such as
- * `projects/* /locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
- *
- * If the caller does not have permission to access the
- * {@link google.cloud.retail.v2beta.Product|Product}, regardless of whether or not
- * it exists, a PERMISSION_DENIED error is returned.
- *
- * If the requested {@link google.cloud.retail.v2beta.Product|Product} does not
- * exist, a NOT_FOUND error is returned.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [Product]{@link google.cloud.retail.v2beta.Product}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getProduct(request);
- */
getProduct(
request?: protos.google.cloud.retail.v2beta.IGetProductRequest,
optionsOrCallback?:
@@ -601,37 +601,6 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.getProduct(request, options, callback);
}
- updateProduct(
- request?: protos.google.cloud.retail.v2beta.IUpdateProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2beta.IProduct,
- protos.google.cloud.retail.v2beta.IUpdateProductRequest | undefined,
- {} | undefined
- ]
- >;
- updateProduct(
- request: protos.google.cloud.retail.v2beta.IUpdateProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.cloud.retail.v2beta.IProduct,
- | protos.google.cloud.retail.v2beta.IUpdateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- updateProduct(
- request: protos.google.cloud.retail.v2beta.IUpdateProductRequest,
- callback: Callback<
- protos.google.cloud.retail.v2beta.IProduct,
- | protos.google.cloud.retail.v2beta.IUpdateProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Updates a {@link google.cloud.retail.v2beta.Product|Product}.
*
@@ -667,9 +636,40 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.updateProduct(request);
+ * @example include:samples/generated/v2beta/product_service.update_product.js
+ * region_tag:retail_v2beta_generated_ProductService_UpdateProduct_async
*/
+ updateProduct(
+ request?: protos.google.cloud.retail.v2beta.IUpdateProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2beta.IProduct,
+ protos.google.cloud.retail.v2beta.IUpdateProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ updateProduct(
+ request: protos.google.cloud.retail.v2beta.IUpdateProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.IProduct,
+ | protos.google.cloud.retail.v2beta.IUpdateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ updateProduct(
+ request: protos.google.cloud.retail.v2beta.IUpdateProductRequest,
+ callback: Callback<
+ protos.google.cloud.retail.v2beta.IProduct,
+ | protos.google.cloud.retail.v2beta.IUpdateProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
updateProduct(
request?: protos.google.cloud.retail.v2beta.IUpdateProductRequest,
optionsOrCallback?:
@@ -713,37 +713,6 @@ export class ProductServiceClient {
this.initialize();
return this.innerApiCalls.updateProduct(request, options, callback);
}
- deleteProduct(
- request?: protos.google.cloud.retail.v2beta.IDeleteProductRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.protobuf.IEmpty,
- protos.google.cloud.retail.v2beta.IDeleteProductRequest | undefined,
- {} | undefined
- ]
- >;
- deleteProduct(
- request: protos.google.cloud.retail.v2beta.IDeleteProductRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2beta.IDeleteProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- deleteProduct(
- request: protos.google.cloud.retail.v2beta.IDeleteProductRequest,
- callback: Callback<
- protos.google.protobuf.IEmpty,
- | protos.google.cloud.retail.v2beta.IDeleteProductRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Deletes a {@link google.cloud.retail.v2beta.Product|Product}.
*
@@ -779,9 +748,40 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.deleteProduct(request);
+ * @example include:samples/generated/v2beta/product_service.delete_product.js
+ * region_tag:retail_v2beta_generated_ProductService_DeleteProduct_async
*/
+ deleteProduct(
+ request?: protos.google.cloud.retail.v2beta.IDeleteProductRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ protos.google.cloud.retail.v2beta.IDeleteProductRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ deleteProduct(
+ request: protos.google.cloud.retail.v2beta.IDeleteProductRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2beta.IDeleteProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ deleteProduct(
+ request: protos.google.cloud.retail.v2beta.IDeleteProductRequest,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.cloud.retail.v2beta.IDeleteProductRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
deleteProduct(
request?: protos.google.cloud.retail.v2beta.IDeleteProductRequest,
optionsOrCallback?:
@@ -826,42 +826,6 @@ export class ProductServiceClient {
return this.innerApiCalls.deleteProduct(request, options, callback);
}
- importProducts(
- request?: protos.google.cloud.retail.v2beta.IImportProductsRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2beta.IImportProductsResponse,
- protos.google.cloud.retail.v2beta.IImportMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- importProducts(
- request: protos.google.cloud.retail.v2beta.IImportProductsRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IImportProductsResponse,
- protos.google.cloud.retail.v2beta.IImportMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- importProducts(
- request: protos.google.cloud.retail.v2beta.IImportProductsRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IImportProductsResponse,
- protos.google.cloud.retail.v2beta.IImportMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Bulk import of multiple {@link google.cloud.retail.v2beta.Product|Product}s.
*
@@ -919,10 +883,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.importProducts(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2beta/product_service.import_products.js
+ * region_tag:retail_v2beta_generated_ProductService_ImportProducts_async
*/
+ importProducts(
+ request?: protos.google.cloud.retail.v2beta.IImportProductsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2beta.IImportProductsResponse,
+ protos.google.cloud.retail.v2beta.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ importProducts(
+ request: protos.google.cloud.retail.v2beta.IImportProductsRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IImportProductsResponse,
+ protos.google.cloud.retail.v2beta.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ importProducts(
+ request: protos.google.cloud.retail.v2beta.IImportProductsRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IImportProductsResponse,
+ protos.google.cloud.retail.v2beta.IImportMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
importProducts(
request?: protos.google.cloud.retail.v2beta.IImportProductsRequest,
optionsOrCallback?:
@@ -980,11 +979,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportProductsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/product_service.import_products.js
+ * region_tag:retail_v2beta_generated_ProductService_ImportProducts_async
*/
async checkImportProductsProgress(
name: string
@@ -995,55 +991,19 @@ export class ProductServiceClient {
>
> {
const request = new operationsProtos.google.longrunning.GetOperationRequest(
- {name}
- );
- const [operation] = await this.operationsClient.getOperation(request);
- const decodeOperation = new gax.Operation(
- operation,
- this.descriptors.longrunning.importProducts,
- gax.createDefaultBackoffSettings()
- );
- return decodeOperation as LROperation<
- protos.google.cloud.retail.v2beta.ImportProductsResponse,
- protos.google.cloud.retail.v2beta.ImportMetadata
- >;
- }
- setInventory(
- request?: protos.google.cloud.retail.v2beta.ISetInventoryRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2beta.ISetInventoryResponse,
- protos.google.cloud.retail.v2beta.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- setInventory(
- request: protos.google.cloud.retail.v2beta.ISetInventoryRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.ISetInventoryResponse,
- protos.google.cloud.retail.v2beta.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- setInventory(
- request: protos.google.cloud.retail.v2beta.ISetInventoryRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.ISetInventoryResponse,
- protos.google.cloud.retail.v2beta.ISetInventoryMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
+ {name}
+ );
+ const [operation] = await this.operationsClient.getOperation(request);
+ const decodeOperation = new gax.Operation(
+ operation,
+ this.descriptors.longrunning.importProducts,
+ gax.createDefaultBackoffSettings()
+ );
+ return decodeOperation as LROperation<
+ protos.google.cloud.retail.v2beta.ImportProductsResponse,
+ protos.google.cloud.retail.v2beta.ImportMetadata
+ >;
+ }
/**
* Updates inventory information for a
* {@link google.cloud.retail.v2beta.Product|Product} while respecting the last
@@ -1152,10 +1112,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.setInventory(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2beta/product_service.set_inventory.js
+ * region_tag:retail_v2beta_generated_ProductService_SetInventory_async
*/
+ setInventory(
+ request?: protos.google.cloud.retail.v2beta.ISetInventoryRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2beta.ISetInventoryResponse,
+ protos.google.cloud.retail.v2beta.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ setInventory(
+ request: protos.google.cloud.retail.v2beta.ISetInventoryRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.ISetInventoryResponse,
+ protos.google.cloud.retail.v2beta.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ setInventory(
+ request: protos.google.cloud.retail.v2beta.ISetInventoryRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.ISetInventoryResponse,
+ protos.google.cloud.retail.v2beta.ISetInventoryMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
setInventory(
request?: protos.google.cloud.retail.v2beta.ISetInventoryRequest,
optionsOrCallback?:
@@ -1213,11 +1208,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkSetInventoryProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/product_service.set_inventory.js
+ * region_tag:retail_v2beta_generated_ProductService_SetInventory_async
*/
async checkSetInventoryProgress(
name: string
@@ -1241,42 +1233,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2beta.SetInventoryMetadata
>;
}
- addFulfillmentPlaces(
- request?: protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- addFulfillmentPlaces(
- request: protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- addFulfillmentPlaces(
- request: protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Incrementally adds place IDs to
* {@link google.cloud.retail.v2beta.FulfillmentInfo.place_ids|Product.fulfillment_info.place_ids}.
@@ -1360,10 +1316,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.addFulfillmentPlaces(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2beta/product_service.add_fulfillment_places.js
+ * region_tag:retail_v2beta_generated_ProductService_AddFulfillmentPlaces_async
*/
+ addFulfillmentPlaces(
+ request?: protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ addFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ addFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
addFulfillmentPlaces(
request?: protos.google.cloud.retail.v2beta.IAddFulfillmentPlacesRequest,
optionsOrCallback?:
@@ -1421,11 +1412,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkAddFulfillmentPlacesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/product_service.add_fulfillment_places.js
+ * region_tag:retail_v2beta_generated_ProductService_AddFulfillmentPlaces_async
*/
async checkAddFulfillmentPlacesProgress(
name: string
@@ -1449,42 +1437,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata
>;
}
- removeFulfillmentPlaces(
- request?: protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- removeFulfillmentPlaces(
- request: protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- removeFulfillmentPlaces(
- request: protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesResponse,
- protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Incrementally removes place IDs from a
* {@link google.cloud.retail.v2beta.FulfillmentInfo.place_ids|Product.fulfillment_info.place_ids}.
@@ -1563,10 +1515,45 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.removeFulfillmentPlaces(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2beta/product_service.remove_fulfillment_places.js
+ * region_tag:retail_v2beta_generated_ProductService_RemoveFulfillmentPlaces_async
*/
+ removeFulfillmentPlaces(
+ request?: protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ removeFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ removeFulfillmentPlaces(
+ request: protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesResponse,
+ protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
removeFulfillmentPlaces(
request?: protos.google.cloud.retail.v2beta.IRemoveFulfillmentPlacesRequest,
optionsOrCallback?:
@@ -1628,11 +1615,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkRemoveFulfillmentPlacesProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/product_service.remove_fulfillment_places.js
+ * region_tag:retail_v2beta_generated_ProductService_RemoveFulfillmentPlaces_async
*/
async checkRemoveFulfillmentPlacesProgress(
name: string
@@ -1656,37 +1640,6 @@ export class ProductServiceClient {
protos.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata
>;
}
- listProducts(
- request?: protos.google.cloud.retail.v2beta.IListProductsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2beta.IProduct[],
- protos.google.cloud.retail.v2beta.IListProductsRequest | null,
- protos.google.cloud.retail.v2beta.IListProductsResponse
- ]
- >;
- listProducts(
- request: protos.google.cloud.retail.v2beta.IListProductsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2beta.IListProductsRequest,
- | protos.google.cloud.retail.v2beta.IListProductsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2beta.IProduct
- >
- ): void;
- listProducts(
- request: protos.google.cloud.retail.v2beta.IListProductsRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2beta.IListProductsRequest,
- | protos.google.cloud.retail.v2beta.IListProductsResponse
- | null
- | undefined,
- protos.google.cloud.retail.v2beta.IProduct
- >
- ): void;
/**
* Gets a list of {@link google.cloud.retail.v2beta.Product|Product}s.
*
@@ -1780,6 +1733,37 @@ export class ProductServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listProducts(
+ request?: protos.google.cloud.retail.v2beta.IListProductsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2beta.IProduct[],
+ protos.google.cloud.retail.v2beta.IListProductsRequest | null,
+ protos.google.cloud.retail.v2beta.IListProductsResponse
+ ]
+ >;
+ listProducts(
+ request: protos.google.cloud.retail.v2beta.IListProductsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2beta.IListProductsRequest,
+ | protos.google.cloud.retail.v2beta.IListProductsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2beta.IProduct
+ >
+ ): void;
+ listProducts(
+ request: protos.google.cloud.retail.v2beta.IListProductsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2beta.IListProductsRequest,
+ | protos.google.cloud.retail.v2beta.IListProductsResponse
+ | null
+ | undefined,
+ protos.google.cloud.retail.v2beta.IProduct
+ >
+ ): void;
listProducts(
request?: protos.google.cloud.retail.v2beta.IListProductsRequest,
optionsOrCallback?:
@@ -2028,11 +2012,8 @@ export class ProductServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listProductsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2beta/product_service.list_products.js
+ * region_tag:retail_v2beta_generated_ProductService_ListProducts_async
*/
listProductsAsync(
request?: protos.google.cloud.retail.v2beta.IListProductsRequest,
@@ -2046,7 +2027,6 @@ export class ProductServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listProducts'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2beta/search_service_client.ts b/packages/google-cloud-retail/src/v2beta/search_service_client.ts
index 0b613521842..a7ed9346f67 100644
--- a/packages/google-cloud-retail/src/v2beta/search_service_client.ts
+++ b/packages/google-cloud-retail/src/v2beta/search_service_client.ts
@@ -322,33 +322,6 @@ export class SearchServiceClient {
// -- Service calls --
// -------------------
- search(
- request?: protos.google.cloud.retail.v2beta.ISearchRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.retail.v2beta.SearchResponse.ISearchResult[],
- protos.google.cloud.retail.v2beta.ISearchRequest | null,
- protos.google.cloud.retail.v2beta.ISearchResponse
- ]
- >;
- search(
- request: protos.google.cloud.retail.v2beta.ISearchRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2beta.ISearchRequest,
- protos.google.cloud.retail.v2beta.ISearchResponse | null | undefined,
- protos.google.cloud.retail.v2beta.SearchResponse.ISearchResult
- >
- ): void;
- search(
- request: protos.google.cloud.retail.v2beta.ISearchRequest,
- callback: PaginationCallback<
- protos.google.cloud.retail.v2beta.ISearchRequest,
- protos.google.cloud.retail.v2beta.ISearchResponse | null | undefined,
- protos.google.cloud.retail.v2beta.SearchResponse.ISearchResult
- >
- ): void;
/**
* Performs a search.
*
@@ -549,6 +522,33 @@ export class SearchServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ search(
+ request?: protos.google.cloud.retail.v2beta.ISearchRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.retail.v2beta.SearchResponse.ISearchResult[],
+ protos.google.cloud.retail.v2beta.ISearchRequest | null,
+ protos.google.cloud.retail.v2beta.ISearchResponse
+ ]
+ >;
+ search(
+ request: protos.google.cloud.retail.v2beta.ISearchRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2beta.ISearchRequest,
+ protos.google.cloud.retail.v2beta.ISearchResponse | null | undefined,
+ protos.google.cloud.retail.v2beta.SearchResponse.ISearchResult
+ >
+ ): void;
+ search(
+ request: protos.google.cloud.retail.v2beta.ISearchRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.retail.v2beta.ISearchRequest,
+ protos.google.cloud.retail.v2beta.ISearchResponse | null | undefined,
+ protos.google.cloud.retail.v2beta.SearchResponse.ISearchResult
+ >
+ ): void;
search(
request?: protos.google.cloud.retail.v2beta.ISearchRequest,
optionsOrCallback?:
@@ -999,11 +999,8 @@ export class SearchServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.searchAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v2beta/search_service.search.js
+ * region_tag:retail_v2beta_generated_SearchService_Search_async
*/
searchAsync(
request?: protos.google.cloud.retail.v2beta.ISearchRequest,
@@ -1017,7 +1014,6 @@ export class SearchServiceClient {
gax.routingHeader.fromParams({
placement: request.placement || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['search'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
diff --git a/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts b/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts
index fb27c34ff6c..6841441e06b 100644
--- a/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts
+++ b/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts
@@ -356,6 +356,26 @@ export class UserEventServiceClient {
// -------------------
// -- Service calls --
// -------------------
+ /**
+ * Writes a single user event.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The parent catalog resource name, such as
+ * `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2beta.UserEvent} request.userEvent
+ * Required. User event to write.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [UserEvent]{@link google.cloud.retail.v2beta.UserEvent}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v2beta/user_event_service.write_user_event.js
+ * region_tag:retail_v2beta_generated_UserEventService_WriteUserEvent_async
+ */
writeUserEvent(
request?: protos.google.cloud.retail.v2beta.IWriteUserEventRequest,
options?: CallOptions
@@ -387,26 +407,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Writes a single user event.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The parent catalog resource name, such as
- * `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2beta.UserEvent} request.userEvent
- * Required. User event to write.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing [UserEvent]{@link google.cloud.retail.v2beta.UserEvent}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.writeUserEvent(request);
- */
writeUserEvent(
request?: protos.google.cloud.retail.v2beta.IWriteUserEventRequest,
optionsOrCallback?:
@@ -450,37 +450,6 @@ export class UserEventServiceClient {
this.initialize();
return this.innerApiCalls.writeUserEvent(request, options, callback);
}
- collectUserEvent(
- request?: protos.google.cloud.retail.v2beta.ICollectUserEventRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.api.IHttpBody,
- protos.google.cloud.retail.v2beta.ICollectUserEventRequest | undefined,
- {} | undefined
- ]
- >;
- collectUserEvent(
- request: protos.google.cloud.retail.v2beta.ICollectUserEventRequest,
- options: CallOptions,
- callback: Callback<
- protos.google.api.IHttpBody,
- | protos.google.cloud.retail.v2beta.ICollectUserEventRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
- collectUserEvent(
- request: protos.google.cloud.retail.v2beta.ICollectUserEventRequest,
- callback: Callback<
- protos.google.api.IHttpBody,
- | protos.google.cloud.retail.v2beta.ICollectUserEventRequest
- | null
- | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Writes a single user event from the browser. This uses a GET request to
* due to browser restriction of POST-ing to a 3rd party domain.
@@ -512,9 +481,40 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.collectUserEvent(request);
+ * @example include:samples/generated/v2beta/user_event_service.collect_user_event.js
+ * region_tag:retail_v2beta_generated_UserEventService_CollectUserEvent_async
*/
+ collectUserEvent(
+ request?: protos.google.cloud.retail.v2beta.ICollectUserEventRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.api.IHttpBody,
+ protos.google.cloud.retail.v2beta.ICollectUserEventRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ collectUserEvent(
+ request: protos.google.cloud.retail.v2beta.ICollectUserEventRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.api.IHttpBody,
+ | protos.google.cloud.retail.v2beta.ICollectUserEventRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ collectUserEvent(
+ request: protos.google.cloud.retail.v2beta.ICollectUserEventRequest,
+ callback: Callback<
+ protos.google.api.IHttpBody,
+ | protos.google.cloud.retail.v2beta.ICollectUserEventRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
collectUserEvent(
request?: protos.google.cloud.retail.v2beta.ICollectUserEventRequest,
optionsOrCallback?:
@@ -559,42 +559,6 @@ export class UserEventServiceClient {
return this.innerApiCalls.collectUserEvent(request, options, callback);
}
- purgeUserEvents(
- request?: protos.google.cloud.retail.v2beta.IPurgeUserEventsRequest,
- options?: CallOptions
- ): Promise<
- [
- LROperation<
- protos.google.cloud.retail.v2beta.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2beta.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | undefined,
- {} | undefined
- ]
- >;
- purgeUserEvents(
- request: protos.google.cloud.retail.v2beta.IPurgeUserEventsRequest,
- options: CallOptions,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2beta.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
- purgeUserEvents(
- request: protos.google.cloud.retail.v2beta.IPurgeUserEventsRequest,
- callback: Callback<
- LROperation<
- protos.google.cloud.retail.v2beta.IPurgeUserEventsResponse,
- protos.google.cloud.retail.v2beta.IPurgeMetadata
- >,
- protos.google.longrunning.IOperation | null | undefined,
- {} | null | undefined
- >
- ): void;
/**
* Deletes permanently all user events specified by the filter provided.
* Depending on the number of events specified by the filter, this operation
@@ -645,10 +609,45 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const [operation] = await client.purgeUserEvents(request);
- * const [response] = await operation.promise();
+ * @example include:samples/generated/v2beta/user_event_service.purge_user_events.js
+ * region_tag:retail_v2beta_generated_UserEventService_PurgeUserEvents_async
*/
+ purgeUserEvents(
+ request?: protos.google.cloud.retail.v2beta.IPurgeUserEventsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ LROperation<
+ protos.google.cloud.retail.v2beta.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2beta.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | undefined,
+ {} | undefined
+ ]
+ >;
+ purgeUserEvents(
+ request: protos.google.cloud.retail.v2beta.IPurgeUserEventsRequest,
+ options: CallOptions,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2beta.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ purgeUserEvents(
+ request: protos.google.cloud.retail.v2beta.IPurgeUserEventsRequest,
+ callback: Callback<
+ LROperation<
+ protos.google.cloud.retail.v2beta.IPurgeUserEventsResponse,
+ protos.google.cloud.retail.v2beta.IPurgeMetadata
+ >,
+ protos.google.longrunning.IOperation | null | undefined,
+ {} | null | undefined
+ >
+ ): void;
purgeUserEvents(
request?: protos.google.cloud.retail.v2beta.IPurgeUserEventsRequest,
optionsOrCallback?:
@@ -706,11 +705,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkPurgeUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/user_event_service.purge_user_events.js
+ * region_tag:retail_v2beta_generated_UserEventService_PurgeUserEvents_async
*/
async checkPurgeUserEventsProgress(
name: string
@@ -734,6 +730,36 @@ export class UserEventServiceClient {
protos.google.cloud.retail.v2beta.PurgeMetadata
>;
}
+ /**
+ * Bulk import of User events. Request processing might be
+ * synchronous. Events that already exist are skipped.
+ * Use this method for backfilling historical user events.
+ *
+ * Operation.response is of type ImportResponse. Note that it is
+ * possible for a subset of the items to be successfully inserted.
+ * Operation.metadata is of type ImportMetadata.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. `projects/1234/locations/global/catalogs/default_catalog`
+ * @param {google.cloud.retail.v2beta.UserEventInputConfig} request.inputConfig
+ * Required. The desired input location of the data.
+ * @param {google.cloud.retail.v2beta.ImportErrorsConfig} request.errorsConfig
+ * The desired location of errors incurred during the Import. Cannot be set
+ * for inline user event imports.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2beta/user_event_service.import_user_events.js
+ * region_tag:retail_v2beta_generated_UserEventService_ImportUserEvents_async
+ */
importUserEvents(
request?: protos.google.cloud.retail.v2beta.IImportUserEventsRequest,
options?: CallOptions
@@ -770,37 +796,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Bulk import of User events. Request processing might be
- * synchronous. Events that already exist are skipped.
- * Use this method for backfilling historical user events.
- *
- * Operation.response is of type ImportResponse. Note that it is
- * possible for a subset of the items to be successfully inserted.
- * Operation.metadata is of type ImportMetadata.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. `projects/1234/locations/global/catalogs/default_catalog`
- * @param {google.cloud.retail.v2beta.UserEventInputConfig} request.inputConfig
- * Required. The desired input location of the data.
- * @param {google.cloud.retail.v2beta.ImportErrorsConfig} request.errorsConfig
- * The desired location of errors incurred during the Import. Cannot be set
- * for inline user event imports.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.importUserEvents(request);
- * const [response] = await operation.promise();
- */
importUserEvents(
request?: protos.google.cloud.retail.v2beta.IImportUserEventsRequest,
optionsOrCallback?:
@@ -858,11 +853,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkImportUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/user_event_service.import_user_events.js
+ * region_tag:retail_v2beta_generated_UserEventService_ImportUserEvents_async
*/
async checkImportUserEventsProgress(
name: string
@@ -886,6 +878,37 @@ export class UserEventServiceClient {
protos.google.cloud.retail.v2beta.ImportMetadata
>;
}
+ /**
+ * Triggers 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 API can be used to trigger a 'join' operation on specified
+ * events with latest version of product catalog. It can also be used to
+ * correct events joined with wrong product catalog.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The parent catalog resource name, such as
+ * `projects/1234/locations/global/catalogs/default_catalog`.
+ * @param {google.cloud.retail.v2beta.RejoinUserEventsRequest.UserEventRejoinScope} request.userEventRejoinScope
+ * The type of the user event rejoin to define the scope and range of the user
+ * events to be rejoined with the latest product catalog. Defaults to
+ * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
+ * invalid integer value.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing
+ * a long running operation. Its `promise()` method returns a promise
+ * you can `await` for.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
+ * for more details and examples.
+ * @example include:samples/generated/v2beta/user_event_service.rejoin_user_events.js
+ * region_tag:retail_v2beta_generated_UserEventService_RejoinUserEvents_async
+ */
rejoinUserEvents(
request?: protos.google.cloud.retail.v2beta.IRejoinUserEventsRequest,
options?: CallOptions
@@ -922,38 +945,6 @@ export class UserEventServiceClient {
{} | null | undefined
>
): void;
- /**
- * Triggers 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 API can be used to trigger a 'join' operation on specified
- * events with latest version of product catalog. It can also be used to
- * correct events joined with wrong product catalog.
- *
- * @param {Object} request
- * The request object that will be sent.
- * @param {string} request.parent
- * Required. The parent catalog resource name, such as
- * `projects/1234/locations/global/catalogs/default_catalog`.
- * @param {google.cloud.retail.v2beta.RejoinUserEventsRequest.UserEventRejoinScope} request.userEventRejoinScope
- * The type of the user event rejoin to define the scope and range of the user
- * events to be rejoined with the latest product catalog. Defaults to
- * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
- * invalid integer value.
- * @param {object} [options]
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
- * @returns {Promise} - The promise which resolves to an array.
- * The first element of the array is an object representing
- * a long running operation. Its `promise()` method returns a promise
- * you can `await` for.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
- * for more details and examples.
- * @example
- * const [operation] = await client.rejoinUserEvents(request);
- * const [response] = await operation.promise();
- */
rejoinUserEvents(
request?: protos.google.cloud.retail.v2beta.IRejoinUserEventsRequest,
optionsOrCallback?:
@@ -1011,11 +1002,8 @@ export class UserEventServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
- * @example
- * const decodedOperation = await checkRejoinUserEventsProgress(name);
- * console.log(decodedOperation.result);
- * console.log(decodedOperation.done);
- * console.log(decodedOperation.metadata);
+ * @example include:samples/generated/v2beta/user_event_service.rejoin_user_events.js
+ * region_tag:retail_v2beta_generated_UserEventService_RejoinUserEvents_async
*/
async checkRejoinUserEventsProgress(
name: string