diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog.proto index c95e3ac9340..ca691cc86ae 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog.proto @@ -104,8 +104,7 @@ message CatalogAttribute { // The status of the indexable option of a catalog attribute. enum IndexableOption { - // Value used when unset. Defaults to - // [INDEXABLE_ENABLED][google.cloud.retail.v2beta.CatalogAttribute.IndexableOption.INDEXABLE_ENABLED]. + // Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0; // Indexable option enabled for an attribute. @@ -117,8 +116,7 @@ message CatalogAttribute { // The status of the dynamic facetable option of a catalog attribute. enum DynamicFacetableOption { - // Value used when unset. Defaults to - // [DYNAMIC_FACETABLE_ENABLED][google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED]. + // Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0; // Dynamic facetable option enabled for an attribute. @@ -130,8 +128,7 @@ message CatalogAttribute { // The status of the searchable option of a catalog attribute. enum SearchableOption { - // Value used when unset. Defaults to - // [SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.SearchableOption.SEARCHABLE_DISABLED]. + // Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0; // Searchable option enabled for an attribute. @@ -154,6 +151,19 @@ message CatalogAttribute { EXACT_SEARCHABLE_DISABLED = 2; } + // The status of the retrievable option of a catalog attribute. + enum RetrievableOption { + // Value used when unset. Defaults to + // [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. + RETRIEVABLE_OPTION_UNSPECIFIED = 0; + + // Retrievable option enabled for an attribute. + RETRIEVABLE_ENABLED = 1; + + // Retrievable option disabled for an attribute. + RETRIEVABLE_DISABLED = 2; + } + // Required. Attribute name. // For example: `color`, `brands`, `attributes.custom_attribute`, such as // `attributes.xyz`. @@ -177,13 +187,13 @@ message CatalogAttribute { // APIs. This field is `False` for pre-loaded // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. // - // Only pre-loaded - // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - // neither in use by products nor predefined can be deleted. - // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - // either in use by products or are predefined cannot be deleted; however, - // their configuration properties will reset to default values upon removal - // request. + // Only pre-loaded [catalog + // attributes][google.cloud.retail.v2beta.CatalogAttribute] that are neither + // in use by products nor predefined can be deleted. [Catalog + // attributes][google.cloud.retail.v2beta.CatalogAttribute] that are + // either in use by products or are predefined attributes cannot be deleted; + // however, their configuration properties will reset to default values upon + // removal request. // // After catalog changes, it takes about 10 minutes for this field to update. bool in_use = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -197,12 +207,16 @@ message CatalogAttribute { // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values // are indexed so that it can be filtered, faceted, or boosted in // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. + // + // Must be specified, otherwise throws INVALID_FORMAT error. IndexableOption indexable_option = 5; // If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic // facet. Could only be DYNAMIC_FACETABLE_DISABLED if // [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] // is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. + // + // Must be specified, otherwise throws INVALID_FORMAT error. DynamicFacetableOption dynamic_facetable_option = 6; // When @@ -215,6 +229,8 @@ message CatalogAttribute { // will not be searchable by text queries in // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as // there are no text values associated to numerical attributes. + // + // Must be specified, otherwise throws INVALID_FORMAT error. SearchableOption searchable_option = 7; // When @@ -229,6 +245,10 @@ message CatalogAttribute { // This property only applies to textual custom attributes and requires // indexable set to enabled to enable exact-searchable. ExactSearchableOption exact_searchable_option = 11; + + // If RETRIEVABLE_ENABLED, attribute values are retrievable in the search + // results. + RetrievableOption retrievable_option = 12; } // Catalog level attribute config. @@ -353,16 +373,16 @@ message CompletionConfig { // will be streamed to the linked branch. message MerchantCenterLink { // Required. The linked [Merchant center account - // id](https://developers.google.com/shopping-content/guides/accountstatuses). + // ID](https://developers.google.com/shopping-content/guides/accountstatuses). // The account must be a standalone account or a sub-account of a MCA. int64 merchant_center_account_id = 1 [(google.api.field_behavior) = REQUIRED]; - // The branch id (e.g. 0/1/2) within this catalog that products from + // The branch ID (e.g. 0/1/2) within this catalog that products from // merchant_center_account_id are streamed to. When updating this field, an // empty value will use the currently configured default branch. However, // changing the default branch later on won't change the linked branch here. // - // A single branch id can only have one linked merchant center account id. + // A single branch ID can only have one linked merchant center account ID. string branch_id = 2; // String representing the destination to import for, all if left empty. @@ -392,6 +412,21 @@ message MerchantCenterLink { // // Example value: `en`. string language_code = 5; + + // Criteria for the Merchant Center feeds to be ingested via the link. + // All offers will be ingested if the list is empty. + // Otherwise the offers will be ingested from selected feeds. + repeated MerchantCenterFeedFilter feeds = 6; +} + +// Merchant Center Feed filter criterion. +message MerchantCenterFeedFilter { + // Merchant Center primary feed ID. + int64 primary_feed_id = 1; + + // Merchant Center primary feed name. The name is used for the display + // purposes only. + string primary_feed_name = 2; } // Configures Merchant Center linking. diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog_service.proto index 7001c211324..bab1fc34aa5 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/catalog_service.proto @@ -483,13 +483,18 @@ message BatchRemoveCatalogAttributesRequest { // Response of the // [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes]. message BatchRemoveCatalogAttributesResponse { - // Catalog attributes that were deleted. Only attributes that are not [in - // use][CatalogAttribute.in_use] by products can be deleted. + // Catalog attributes that were deleted. Only pre-loaded [catalog + // attributes][google.cloud.retail.v2beta.CatalogAttribute] that are + // neither [in + // use][google.cloud.retail.v2beta.CatalogAttribute.in_use] by + // products nor predefined can be deleted. repeated string deleted_catalog_attributes = 1; - // Catalog attributes that were reset. Attributes that are [in - // use][CatalogAttribute.in_use] by products cannot be deleted, however their - // configuration properties will reset to default values upon removal request. + // Catalog attributes that were reset. [Catalog + // attributes][google.cloud.retail.v2beta.CatalogAttribute] that are either + // [in use][google.cloud.retail.v2beta.CatalogAttribute.in_use] by products or + // are predefined attributes cannot be deleted; however, their configuration + // properties will reset to default values upon removal request. repeated string reset_catalog_attributes = 2; } diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/common.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/common.proto index fd1247636b4..5aab1d0ddc3 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/common.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/common.proto @@ -218,7 +218,8 @@ message Rule { } // Creates a set of terms that will be treated as synonyms of each other. - // Example: synonyms of "sneakers" and "shoes". + // Example: synonyms of "sneakers" and "shoes": + // // * "sneakers" will use a synonym of "shoes". // * "shoes" will use a synonym of "sneakers". message TwowaySynonymsAction { diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/completion_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/completion_service.proto index 4db036647f9..635189b6096 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/completion_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/completion_service.proto @@ -110,8 +110,10 @@ message CompleteQueryRequest { // number of language codes is 3. repeated string language_codes = 3; - // The device type context for completion suggestions. - // It is useful to apply different suggestions on different device types, e.g. + // The device type context for completion suggestions. We recommend that you + // leave this field empty. + // + // It can apply different suggestions on different device types, e.g. // `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device // types. // diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/control.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/control.proto index 238f0f5fe69..2d6367199ee 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/control.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/control.proto @@ -68,8 +68,8 @@ message Control { string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // Output only. List of [serving - // configuration][google.cloud.retail.v2beta.ServingConfig] ids that are - // associated with this control in the same + // config][google.cloud.retail.v2beta.ServingConfig] ids that are associated + // with this control in the same // [Catalog][google.cloud.retail.v2beta.Catalog]. // // Note the association is managed via the diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/export_config.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/export_config.proto index de24f41907a..d330c6faa53 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/export_config.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/export_config.proto @@ -81,10 +81,14 @@ message ExportUserEventsResponse { OutputResult output_result = 3; } -// Output result. +// Output result that stores the information about where the exported data is +// stored. message OutputResult { - // Export result in BigQuery. + // The BigQuery location where the result is stored. repeated BigQueryOutputResult bigquery_result = 1; + + // The Google Cloud Storage location where the result is stored. + repeated GcsOutputResult gcs_result = 2; } // A BigQuery output result. @@ -95,3 +99,9 @@ message BigQueryOutputResult { // The ID of a BigQuery Table. string table_id = 2; } + +// A Gcs output result. +message GcsOutputResult { + // The uri of Gcs output + string output_uri = 1; +} diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/model.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/model.proto index ea4bd30c6c9..3141b0df500 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/model.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/model.proto @@ -160,7 +160,8 @@ message Model { // // Currently supported values: `recommended-for-you`, `others-you-may-like`, // `frequently-bought-together`, `page-optimization`, `similar-items`, - // `buy-it-again`, and `recently-viewed`(readonly value). + // `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). + // // // This field together with // [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective] diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/prediction_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/prediction_service.proto index 1ac3026d63f..7b3f322f197 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/prediction_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/prediction_service.proto @@ -62,7 +62,7 @@ message PredictRequest { // The ID of the Recommendations AI serving config or placement. // Before you can request predictions from your model, you must create at // least one serving config or placement for it. For more information, see - // [Managing serving configurations] + // [Manage serving configs] // (https://cloud.google.com/retail/docs/manage-configs). // // The full list of available serving configs can be seen at @@ -117,12 +117,11 @@ message PredictRequest { // * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems // - // If your filter blocks all prediction results, the API will return generic - // (unfiltered) popular products. If you only want results strictly matching - // the filters, set `strictFiltering` to True in `PredictRequest.params` to - // receive empty results instead. - // Note that the API will never return items with storageStatus of "EXPIRED" - // or "DELETED" regardless of filter choices. + // If your filter blocks all prediction results, the API will return *no* + // results. If instead you want empty result sets to return generic + // (unfiltered) popular products, set `strictFiltering` to False in + // `PredictRequest.params`. Note that the API will never return items with + // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. // // If `filterSyntaxV2` is set to true under the `params` field, then // attribute-based expressions are expected instead of the above described @@ -149,7 +148,7 @@ message PredictRequest { // * `returnScore`: Boolean. If set to true, the prediction 'score' // corresponding to each returned product will be set in the // `results.metadata` field in the prediction response. The given - // 'score' indicates the probability of an product being clicked/purchased + // 'score' indicates the probability of a product being clicked/purchased // given the user's context and history. // * `strictFiltering`: Boolean. True by default. If set to false, the service // will return generic (unfiltered) popular products instead of empty if diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/product.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/product.proto index 8b10090136f..383c06a2bab 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/product.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/product.proto @@ -105,6 +105,13 @@ message Product { oneof expiration { // The timestamp when this product becomes unavailable for // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. + // Note that this is only applicable to + // [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and + // [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION], + // and ignored for + // [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In + // general, we suggest the users to delete the stale products explicitly, + // instead of using this field to determine staleness. // // If it is set, the [Product][google.cloud.retail.v2beta.Product] is not // available for @@ -125,7 +132,14 @@ message Product { // [expiration_date](https://support.google.com/merchants/answer/6324499). google.protobuf.Timestamp expire_time = 16; - // Input only. The TTL (time to live) of the product. + // Input only. The TTL (time to live) of the product. Note that this is only + // applicable to + // [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and + // [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION], + // and ignored for + // [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In + // general, we suggest the users to delete the stale products explicitly, + // instead of using this field to determine staleness. // // If it is set, it must be a non-negative value, and // [expire_time][google.cloud.retail.v2beta.Product.expire_time] is set as @@ -363,6 +377,11 @@ message Product { // The timestamp when this [Product][google.cloud.retail.v2beta.Product] // becomes available for // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. + // Note that this is only applicable to + // [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and + // [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION], and + // ignored for + // [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. google.protobuf.Timestamp available_time = 18; // The online availability of the @@ -550,7 +569,9 @@ message Product { // Note: Returning more fields in // [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase // response payload size and serving latency. - google.protobuf.FieldMask retrievable_fields = 30; + // + // This field is deprecated. Use the retrievable site-wide control instead. + google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true]; // Output only. Product variants grouped together on primary product which // share similar product attributes. It's automatically grouped by diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/search_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/search_service.proto index 5a1004410e6..9bbf255b215 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/search_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/search_service.proto @@ -218,7 +218,7 @@ message SearchRequest { FacetKey facet_key = 1 [(google.api.field_behavior) = REQUIRED]; // Maximum of facet values that should be returned for this facet. If - // unspecified, defaults to 20. The maximum allowed value is 300. Values + // unspecified, defaults to 50. The maximum allowed value is 300. Values // above 300 will be coerced to 300. // // If this field is negative, an INVALID_ARGUMENT is returned. @@ -478,7 +478,7 @@ message SearchRequest { // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` // or the name of the legacy placement resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. - // This field is used to identify the serving configuration name and the set + // This field is used to identify the serving config name and the set // of models that will be used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/user_event_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/user_event_service.proto index 74dccdff892..4dc822bdc3b 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/user_event_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2beta/user_event_service.proto @@ -124,10 +124,24 @@ message WriteUserEventRequest { // Required. User event to write. UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // If set to true, the user event will be written asynchronously after + // validation, and the API will respond without waiting for the write. + // Therefore, silent failures can occur even if the API returns success. In + // case of silent failures, error messages can be found in Stackdriver logs. + bool write_async = 3; } // Request message for CollectUserEvent method. message CollectUserEventRequest { + // The rule that can convert the raw_json to a user event. It is needed + // only when the raw_json is set. + oneof conversion_rule { + // The prebuilt rule name that can convert a specific type of raw_json. + // For example: "default_schema/v1.0" + string prebuilt_rule = 6; + } + // Required. The parent catalog name, such as // `projects/1234/locations/global/catalogs/default_catalog`. string parent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -146,6 +160,12 @@ message CollectUserEventRequest { // otherwise identical get requests. The name is abbreviated to reduce the // payload bytes. int64 ets = 4; + + // An arbitrary serialized JSON string that contains necessary information + // that can comprise a user event. When this field is specified, the + // user_event field will be ignored. Note: line-delimited JSON is not + // supported, a single JSON only. + string raw_json = 5; } // Request message for RejoinUserEvents method. diff --git a/packages/google-cloud-retail/protos/protos.d.ts b/packages/google-cloud-retail/protos/protos.d.ts index bcdbe3e5c94..a373c693c78 100644 --- a/packages/google-cloud-retail/protos/protos.d.ts +++ b/packages/google-cloud-retail/protos/protos.d.ts @@ -35359,6 +35359,9 @@ export namespace google { /** CatalogAttribute exactSearchableOption */ exactSearchableOption?: (google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption|keyof typeof google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption|null); + + /** CatalogAttribute retrievableOption */ + retrievableOption?: (google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption|keyof typeof google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption|null); } /** Represents a CatalogAttribute. */ @@ -35394,6 +35397,9 @@ export namespace google { /** CatalogAttribute exactSearchableOption. */ public exactSearchableOption: (google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption|keyof typeof google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption); + /** CatalogAttribute retrievableOption. */ + public retrievableOption: (google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption|keyof typeof google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption); + /** * Creates a new CatalogAttribute instance using the specified properties. * @param [properties] Properties to set @@ -35508,6 +35514,13 @@ export namespace google { EXACT_SEARCHABLE_ENABLED = 1, EXACT_SEARCHABLE_DISABLED = 2 } + + /** RetrievableOption enum. */ + enum RetrievableOption { + RETRIEVABLE_OPTION_UNSPECIFIED = 0, + RETRIEVABLE_ENABLED = 1, + RETRIEVABLE_DISABLED = 2 + } } /** Properties of an AttributesConfig. */ @@ -35793,6 +35806,9 @@ export namespace google { /** MerchantCenterLink languageCode */ languageCode?: (string|null); + + /** MerchantCenterLink feeds */ + feeds?: (google.cloud.retail.v2beta.IMerchantCenterFeedFilter[]|null); } /** Represents a MerchantCenterLink. */ @@ -35819,6 +35835,9 @@ export namespace google { /** MerchantCenterLink languageCode. */ public languageCode: string; + /** MerchantCenterLink feeds. */ + public feeds: google.cloud.retail.v2beta.IMerchantCenterFeedFilter[]; + /** * Creates a new MerchantCenterLink instance using the specified properties. * @param [properties] Properties to set @@ -35897,6 +35916,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a MerchantCenterFeedFilter. */ + interface IMerchantCenterFeedFilter { + + /** MerchantCenterFeedFilter primaryFeedId */ + primaryFeedId?: (number|Long|string|null); + + /** MerchantCenterFeedFilter primaryFeedName */ + primaryFeedName?: (string|null); + } + + /** Represents a MerchantCenterFeedFilter. */ + class MerchantCenterFeedFilter implements IMerchantCenterFeedFilter { + + /** + * Constructs a new MerchantCenterFeedFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.retail.v2beta.IMerchantCenterFeedFilter); + + /** MerchantCenterFeedFilter primaryFeedId. */ + public primaryFeedId: (number|Long|string); + + /** MerchantCenterFeedFilter primaryFeedName. */ + public primaryFeedName: string; + + /** + * Creates a new MerchantCenterFeedFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns MerchantCenterFeedFilter instance + */ + public static create(properties?: google.cloud.retail.v2beta.IMerchantCenterFeedFilter): google.cloud.retail.v2beta.MerchantCenterFeedFilter; + + /** + * Encodes the specified MerchantCenterFeedFilter message. Does not implicitly {@link google.cloud.retail.v2beta.MerchantCenterFeedFilter.verify|verify} messages. + * @param message MerchantCenterFeedFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.retail.v2beta.IMerchantCenterFeedFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MerchantCenterFeedFilter message, length delimited. Does not implicitly {@link google.cloud.retail.v2beta.MerchantCenterFeedFilter.verify|verify} messages. + * @param message MerchantCenterFeedFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.retail.v2beta.IMerchantCenterFeedFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MerchantCenterFeedFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerchantCenterFeedFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.retail.v2beta.MerchantCenterFeedFilter; + + /** + * Decodes a MerchantCenterFeedFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerchantCenterFeedFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.retail.v2beta.MerchantCenterFeedFilter; + + /** + * Verifies a MerchantCenterFeedFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MerchantCenterFeedFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerchantCenterFeedFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.retail.v2beta.MerchantCenterFeedFilter; + + /** + * Creates a plain object from a MerchantCenterFeedFilter message. Also converts values to other types if specified. + * @param message MerchantCenterFeedFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.retail.v2beta.MerchantCenterFeedFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MerchantCenterFeedFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MerchantCenterFeedFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MerchantCenterLinkingConfig. */ interface IMerchantCenterLinkingConfig { @@ -46829,6 +46951,9 @@ export namespace google { /** OutputResult bigqueryResult */ bigqueryResult?: (google.cloud.retail.v2beta.IBigQueryOutputResult[]|null); + + /** OutputResult gcsResult */ + gcsResult?: (google.cloud.retail.v2beta.IGcsOutputResult[]|null); } /** Represents an OutputResult. */ @@ -46843,6 +46968,9 @@ export namespace google { /** OutputResult bigqueryResult. */ public bigqueryResult: google.cloud.retail.v2beta.IBigQueryOutputResult[]; + /** OutputResult gcsResult. */ + public gcsResult: google.cloud.retail.v2beta.IGcsOutputResult[]; + /** * Creates a new OutputResult instance using the specified properties. * @param [properties] Properties to set @@ -47024,6 +47152,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GcsOutputResult. */ + interface IGcsOutputResult { + + /** GcsOutputResult outputUri */ + outputUri?: (string|null); + } + + /** Represents a GcsOutputResult. */ + class GcsOutputResult implements IGcsOutputResult { + + /** + * Constructs a new GcsOutputResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.retail.v2beta.IGcsOutputResult); + + /** GcsOutputResult outputUri. */ + public outputUri: string; + + /** + * Creates a new GcsOutputResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsOutputResult instance + */ + public static create(properties?: google.cloud.retail.v2beta.IGcsOutputResult): google.cloud.retail.v2beta.GcsOutputResult; + + /** + * Encodes the specified GcsOutputResult message. Does not implicitly {@link google.cloud.retail.v2beta.GcsOutputResult.verify|verify} messages. + * @param message GcsOutputResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.retail.v2beta.IGcsOutputResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsOutputResult message, length delimited. Does not implicitly {@link google.cloud.retail.v2beta.GcsOutputResult.verify|verify} messages. + * @param message GcsOutputResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.retail.v2beta.IGcsOutputResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsOutputResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsOutputResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.retail.v2beta.GcsOutputResult; + + /** + * Decodes a GcsOutputResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsOutputResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.retail.v2beta.GcsOutputResult; + + /** + * Verifies a GcsOutputResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsOutputResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsOutputResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.retail.v2beta.GcsOutputResult; + + /** + * Creates a plain object from a GcsOutputResult message. Also converts values to other types if specified. + * @param message GcsOutputResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.retail.v2beta.GcsOutputResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsOutputResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsOutputResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Model. */ interface IModel { @@ -53040,6 +53265,9 @@ export namespace google { /** WriteUserEventRequest userEvent */ userEvent?: (google.cloud.retail.v2beta.IUserEvent|null); + + /** WriteUserEventRequest writeAsync */ + writeAsync?: (boolean|null); } /** Represents a WriteUserEventRequest. */ @@ -53057,6 +53285,9 @@ export namespace google { /** WriteUserEventRequest userEvent. */ public userEvent?: (google.cloud.retail.v2beta.IUserEvent|null); + /** WriteUserEventRequest writeAsync. */ + public writeAsync: boolean; + /** * Creates a new WriteUserEventRequest instance using the specified properties. * @param [properties] Properties to set @@ -53138,6 +53369,9 @@ export namespace google { /** Properties of a CollectUserEventRequest. */ interface ICollectUserEventRequest { + /** CollectUserEventRequest prebuiltRule */ + prebuiltRule?: (string|null); + /** CollectUserEventRequest parent */ parent?: (string|null); @@ -53149,6 +53383,9 @@ export namespace google { /** CollectUserEventRequest ets */ ets?: (number|Long|string|null); + + /** CollectUserEventRequest rawJson */ + rawJson?: (string|null); } /** Represents a CollectUserEventRequest. */ @@ -53160,6 +53397,9 @@ export namespace google { */ constructor(properties?: google.cloud.retail.v2beta.ICollectUserEventRequest); + /** CollectUserEventRequest prebuiltRule. */ + public prebuiltRule?: (string|null); + /** CollectUserEventRequest parent. */ public parent: string; @@ -53172,6 +53412,12 @@ export namespace google { /** CollectUserEventRequest ets. */ public ets: (number|Long|string); + /** CollectUserEventRequest rawJson. */ + public rawJson: string; + + /** CollectUserEventRequest conversionRule. */ + public conversionRule?: "prebuiltRule"; + /** * Creates a new CollectUserEventRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-retail/protos/protos.js b/packages/google-cloud-retail/protos/protos.js index e0932c02284..ef515e4fed4 100644 --- a/packages/google-cloud-retail/protos/protos.js +++ b/packages/google-cloud-retail/protos/protos.js @@ -87205,6 +87205,7 @@ * @property {google.cloud.retail.v2beta.CatalogAttribute.SearchableOption|null} [searchableOption] CatalogAttribute searchableOption * @property {google.cloud.retail.v2beta.RecommendationsFilteringOption|null} [recommendationsFilteringOption] CatalogAttribute recommendationsFilteringOption * @property {google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption|null} [exactSearchableOption] CatalogAttribute exactSearchableOption + * @property {google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption|null} [retrievableOption] CatalogAttribute retrievableOption */ /** @@ -87286,6 +87287,14 @@ */ CatalogAttribute.prototype.exactSearchableOption = 0; + /** + * CatalogAttribute retrievableOption. + * @member {google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption} retrievableOption + * @memberof google.cloud.retail.v2beta.CatalogAttribute + * @instance + */ + CatalogAttribute.prototype.retrievableOption = 0; + /** * Creates a new CatalogAttribute instance using the specified properties. * @function create @@ -87326,6 +87335,8 @@ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); if (message.exactSearchableOption != null && Object.hasOwnProperty.call(message, "exactSearchableOption")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.exactSearchableOption); + if (message.retrievableOption != null && Object.hasOwnProperty.call(message, "retrievableOption")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.retrievableOption); return writer; }; @@ -87392,6 +87403,10 @@ message.exactSearchableOption = reader.int32(); break; } + case 12: { + message.retrievableOption = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -87487,6 +87502,15 @@ case 2: break; } + if (message.retrievableOption != null && message.hasOwnProperty("retrievableOption")) + switch (message.retrievableOption) { + default: + return "retrievableOption: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -87626,6 +87650,26 @@ message.exactSearchableOption = 2; break; } + switch (object.retrievableOption) { + default: + if (typeof object.retrievableOption === "number") { + message.retrievableOption = object.retrievableOption; + break; + } + break; + case "RETRIEVABLE_OPTION_UNSPECIFIED": + case 0: + message.retrievableOption = 0; + break; + case "RETRIEVABLE_ENABLED": + case 1: + message.retrievableOption = 1; + break; + case "RETRIEVABLE_DISABLED": + case 2: + message.retrievableOption = 2; + break; + } return message; }; @@ -87651,6 +87695,7 @@ object.inUse = false; object.type = options.enums === String ? "UNKNOWN" : 0; object.exactSearchableOption = options.enums === String ? "EXACT_SEARCHABLE_OPTION_UNSPECIFIED" : 0; + object.retrievableOption = options.enums === String ? "RETRIEVABLE_OPTION_UNSPECIFIED" : 0; } if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; @@ -87668,6 +87713,8 @@ object.type = options.enums === String ? $root.google.cloud.retail.v2beta.CatalogAttribute.AttributeType[message.type] === undefined ? message.type : $root.google.cloud.retail.v2beta.CatalogAttribute.AttributeType[message.type] : message.type; if (message.exactSearchableOption != null && message.hasOwnProperty("exactSearchableOption")) object.exactSearchableOption = options.enums === String ? $root.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption[message.exactSearchableOption] === undefined ? message.exactSearchableOption : $root.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption[message.exactSearchableOption] : message.exactSearchableOption; + if (message.retrievableOption != null && message.hasOwnProperty("retrievableOption")) + object.retrievableOption = options.enums === String ? $root.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption[message.retrievableOption] === undefined ? message.retrievableOption : $root.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption[message.retrievableOption] : message.retrievableOption; return object; }; @@ -87777,6 +87824,22 @@ return values; })(); + /** + * RetrievableOption enum. + * @name google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption + * @enum {number} + * @property {number} RETRIEVABLE_OPTION_UNSPECIFIED=0 RETRIEVABLE_OPTION_UNSPECIFIED value + * @property {number} RETRIEVABLE_ENABLED=1 RETRIEVABLE_ENABLED value + * @property {number} RETRIEVABLE_DISABLED=2 RETRIEVABLE_DISABLED value + */ + CatalogAttribute.RetrievableOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETRIEVABLE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "RETRIEVABLE_ENABLED"] = 1; + values[valuesById[2] = "RETRIEVABLE_DISABLED"] = 2; + return values; + })(); + return CatalogAttribute; })(); @@ -88557,6 +88620,7 @@ * @property {Array.|null} [destinations] MerchantCenterLink destinations * @property {string|null} [regionCode] MerchantCenterLink regionCode * @property {string|null} [languageCode] MerchantCenterLink languageCode + * @property {Array.|null} [feeds] MerchantCenterLink feeds */ /** @@ -88569,6 +88633,7 @@ */ function MerchantCenterLink(properties) { this.destinations = []; + this.feeds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88615,6 +88680,14 @@ */ MerchantCenterLink.prototype.languageCode = ""; + /** + * MerchantCenterLink feeds. + * @member {Array.} feeds + * @memberof google.cloud.retail.v2beta.MerchantCenterLink + * @instance + */ + MerchantCenterLink.prototype.feeds = $util.emptyArray; + /** * Creates a new MerchantCenterLink instance using the specified properties. * @function create @@ -88650,6 +88723,9 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.regionCode); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); + if (message.feeds != null && message.feeds.length) + for (var i = 0; i < message.feeds.length; ++i) + $root.google.cloud.retail.v2beta.MerchantCenterFeedFilter.encode(message.feeds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -88706,6 +88782,12 @@ message.languageCode = reader.string(); break; } + case 6: { + if (!(message.feeds && message.feeds.length)) + message.feeds = []; + message.feeds.push($root.google.cloud.retail.v2beta.MerchantCenterFeedFilter.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -88760,6 +88842,15 @@ if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; + if (message.feeds != null && message.hasOwnProperty("feeds")) { + if (!Array.isArray(message.feeds)) + return "feeds: array expected"; + for (var i = 0; i < message.feeds.length; ++i) { + var error = $root.google.cloud.retail.v2beta.MerchantCenterFeedFilter.verify(message.feeds[i]); + if (error) + return "feeds." + error; + } + } return null; }; @@ -88797,6 +88888,16 @@ message.regionCode = String(object.regionCode); if (object.languageCode != null) message.languageCode = String(object.languageCode); + if (object.feeds) { + if (!Array.isArray(object.feeds)) + throw TypeError(".google.cloud.retail.v2beta.MerchantCenterLink.feeds: array expected"); + message.feeds = []; + for (var i = 0; i < object.feeds.length; ++i) { + if (typeof object.feeds[i] !== "object") + throw TypeError(".google.cloud.retail.v2beta.MerchantCenterLink.feeds: object expected"); + message.feeds[i] = $root.google.cloud.retail.v2beta.MerchantCenterFeedFilter.fromObject(object.feeds[i]); + } + } return message; }; @@ -88813,8 +88914,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.destinations = []; + object.feeds = []; + } if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); @@ -88841,6 +88944,11 @@ object.regionCode = message.regionCode; if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; + if (message.feeds && message.feeds.length) { + object.feeds = []; + for (var j = 0; j < message.feeds.length; ++j) + object.feeds[j] = $root.google.cloud.retail.v2beta.MerchantCenterFeedFilter.toObject(message.feeds[j], options); + } return object; }; @@ -88873,6 +88981,247 @@ return MerchantCenterLink; })(); + v2beta.MerchantCenterFeedFilter = (function() { + + /** + * Properties of a MerchantCenterFeedFilter. + * @memberof google.cloud.retail.v2beta + * @interface IMerchantCenterFeedFilter + * @property {number|Long|null} [primaryFeedId] MerchantCenterFeedFilter primaryFeedId + * @property {string|null} [primaryFeedName] MerchantCenterFeedFilter primaryFeedName + */ + + /** + * Constructs a new MerchantCenterFeedFilter. + * @memberof google.cloud.retail.v2beta + * @classdesc Represents a MerchantCenterFeedFilter. + * @implements IMerchantCenterFeedFilter + * @constructor + * @param {google.cloud.retail.v2beta.IMerchantCenterFeedFilter=} [properties] Properties to set + */ + function MerchantCenterFeedFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerchantCenterFeedFilter primaryFeedId. + * @member {number|Long} primaryFeedId + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @instance + */ + MerchantCenterFeedFilter.prototype.primaryFeedId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MerchantCenterFeedFilter primaryFeedName. + * @member {string} primaryFeedName + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @instance + */ + MerchantCenterFeedFilter.prototype.primaryFeedName = ""; + + /** + * Creates a new MerchantCenterFeedFilter instance using the specified properties. + * @function create + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {google.cloud.retail.v2beta.IMerchantCenterFeedFilter=} [properties] Properties to set + * @returns {google.cloud.retail.v2beta.MerchantCenterFeedFilter} MerchantCenterFeedFilter instance + */ + MerchantCenterFeedFilter.create = function create(properties) { + return new MerchantCenterFeedFilter(properties); + }; + + /** + * Encodes the specified MerchantCenterFeedFilter message. Does not implicitly {@link google.cloud.retail.v2beta.MerchantCenterFeedFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {google.cloud.retail.v2beta.IMerchantCenterFeedFilter} message MerchantCenterFeedFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerchantCenterFeedFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primaryFeedId != null && Object.hasOwnProperty.call(message, "primaryFeedId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.primaryFeedId); + if (message.primaryFeedName != null && Object.hasOwnProperty.call(message, "primaryFeedName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.primaryFeedName); + return writer; + }; + + /** + * Encodes the specified MerchantCenterFeedFilter message, length delimited. Does not implicitly {@link google.cloud.retail.v2beta.MerchantCenterFeedFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {google.cloud.retail.v2beta.IMerchantCenterFeedFilter} message MerchantCenterFeedFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerchantCenterFeedFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerchantCenterFeedFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.retail.v2beta.MerchantCenterFeedFilter} MerchantCenterFeedFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerchantCenterFeedFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.retail.v2beta.MerchantCenterFeedFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.primaryFeedId = reader.int64(); + break; + } + case 2: { + message.primaryFeedName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerchantCenterFeedFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.retail.v2beta.MerchantCenterFeedFilter} MerchantCenterFeedFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerchantCenterFeedFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerchantCenterFeedFilter message. + * @function verify + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerchantCenterFeedFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primaryFeedId != null && message.hasOwnProperty("primaryFeedId")) + if (!$util.isInteger(message.primaryFeedId) && !(message.primaryFeedId && $util.isInteger(message.primaryFeedId.low) && $util.isInteger(message.primaryFeedId.high))) + return "primaryFeedId: integer|Long expected"; + if (message.primaryFeedName != null && message.hasOwnProperty("primaryFeedName")) + if (!$util.isString(message.primaryFeedName)) + return "primaryFeedName: string expected"; + return null; + }; + + /** + * Creates a MerchantCenterFeedFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.retail.v2beta.MerchantCenterFeedFilter} MerchantCenterFeedFilter + */ + MerchantCenterFeedFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.retail.v2beta.MerchantCenterFeedFilter) + return object; + var message = new $root.google.cloud.retail.v2beta.MerchantCenterFeedFilter(); + if (object.primaryFeedId != null) + if ($util.Long) + (message.primaryFeedId = $util.Long.fromValue(object.primaryFeedId)).unsigned = false; + else if (typeof object.primaryFeedId === "string") + message.primaryFeedId = parseInt(object.primaryFeedId, 10); + else if (typeof object.primaryFeedId === "number") + message.primaryFeedId = object.primaryFeedId; + else if (typeof object.primaryFeedId === "object") + message.primaryFeedId = new $util.LongBits(object.primaryFeedId.low >>> 0, object.primaryFeedId.high >>> 0).toNumber(); + if (object.primaryFeedName != null) + message.primaryFeedName = String(object.primaryFeedName); + return message; + }; + + /** + * Creates a plain object from a MerchantCenterFeedFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {google.cloud.retail.v2beta.MerchantCenterFeedFilter} message MerchantCenterFeedFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerchantCenterFeedFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.primaryFeedId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.primaryFeedId = options.longs === String ? "0" : 0; + object.primaryFeedName = ""; + } + if (message.primaryFeedId != null && message.hasOwnProperty("primaryFeedId")) + if (typeof message.primaryFeedId === "number") + object.primaryFeedId = options.longs === String ? String(message.primaryFeedId) : message.primaryFeedId; + else + object.primaryFeedId = options.longs === String ? $util.Long.prototype.toString.call(message.primaryFeedId) : options.longs === Number ? new $util.LongBits(message.primaryFeedId.low >>> 0, message.primaryFeedId.high >>> 0).toNumber() : message.primaryFeedId; + if (message.primaryFeedName != null && message.hasOwnProperty("primaryFeedName")) + object.primaryFeedName = message.primaryFeedName; + return object; + }; + + /** + * Converts this MerchantCenterFeedFilter to JSON. + * @function toJSON + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @instance + * @returns {Object.} JSON object + */ + MerchantCenterFeedFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MerchantCenterFeedFilter + * @function getTypeUrl + * @memberof google.cloud.retail.v2beta.MerchantCenterFeedFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MerchantCenterFeedFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.retail.v2beta.MerchantCenterFeedFilter"; + }; + + return MerchantCenterFeedFilter; + })(); + v2beta.MerchantCenterLinkingConfig = (function() { /** @@ -116588,6 +116937,7 @@ * @memberof google.cloud.retail.v2beta * @interface IOutputResult * @property {Array.|null} [bigqueryResult] OutputResult bigqueryResult + * @property {Array.|null} [gcsResult] OutputResult gcsResult */ /** @@ -116600,6 +116950,7 @@ */ function OutputResult(properties) { this.bigqueryResult = []; + this.gcsResult = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116614,6 +116965,14 @@ */ OutputResult.prototype.bigqueryResult = $util.emptyArray; + /** + * OutputResult gcsResult. + * @member {Array.} gcsResult + * @memberof google.cloud.retail.v2beta.OutputResult + * @instance + */ + OutputResult.prototype.gcsResult = $util.emptyArray; + /** * Creates a new OutputResult instance using the specified properties. * @function create @@ -116641,6 +117000,9 @@ if (message.bigqueryResult != null && message.bigqueryResult.length) for (var i = 0; i < message.bigqueryResult.length; ++i) $root.google.cloud.retail.v2beta.BigQueryOutputResult.encode(message.bigqueryResult[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gcsResult != null && message.gcsResult.length) + for (var i = 0; i < message.gcsResult.length; ++i) + $root.google.cloud.retail.v2beta.GcsOutputResult.encode(message.gcsResult[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -116681,6 +117043,12 @@ message.bigqueryResult.push($root.google.cloud.retail.v2beta.BigQueryOutputResult.decode(reader, reader.uint32())); break; } + case 2: { + if (!(message.gcsResult && message.gcsResult.length)) + message.gcsResult = []; + message.gcsResult.push($root.google.cloud.retail.v2beta.GcsOutputResult.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -116725,6 +117093,15 @@ return "bigqueryResult." + error; } } + if (message.gcsResult != null && message.hasOwnProperty("gcsResult")) { + if (!Array.isArray(message.gcsResult)) + return "gcsResult: array expected"; + for (var i = 0; i < message.gcsResult.length; ++i) { + var error = $root.google.cloud.retail.v2beta.GcsOutputResult.verify(message.gcsResult[i]); + if (error) + return "gcsResult." + error; + } + } return null; }; @@ -116750,6 +117127,16 @@ message.bigqueryResult[i] = $root.google.cloud.retail.v2beta.BigQueryOutputResult.fromObject(object.bigqueryResult[i]); } } + if (object.gcsResult) { + if (!Array.isArray(object.gcsResult)) + throw TypeError(".google.cloud.retail.v2beta.OutputResult.gcsResult: array expected"); + message.gcsResult = []; + for (var i = 0; i < object.gcsResult.length; ++i) { + if (typeof object.gcsResult[i] !== "object") + throw TypeError(".google.cloud.retail.v2beta.OutputResult.gcsResult: object expected"); + message.gcsResult[i] = $root.google.cloud.retail.v2beta.GcsOutputResult.fromObject(object.gcsResult[i]); + } + } return message; }; @@ -116766,13 +117153,20 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.bigqueryResult = []; + object.gcsResult = []; + } if (message.bigqueryResult && message.bigqueryResult.length) { object.bigqueryResult = []; for (var j = 0; j < message.bigqueryResult.length; ++j) object.bigqueryResult[j] = $root.google.cloud.retail.v2beta.BigQueryOutputResult.toObject(message.bigqueryResult[j], options); } + if (message.gcsResult && message.gcsResult.length) { + object.gcsResult = []; + for (var j = 0; j < message.gcsResult.length; ++j) + object.gcsResult[j] = $root.google.cloud.retail.v2beta.GcsOutputResult.toObject(message.gcsResult[j], options); + } return object; }; @@ -117032,6 +117426,209 @@ return BigQueryOutputResult; })(); + v2beta.GcsOutputResult = (function() { + + /** + * Properties of a GcsOutputResult. + * @memberof google.cloud.retail.v2beta + * @interface IGcsOutputResult + * @property {string|null} [outputUri] GcsOutputResult outputUri + */ + + /** + * Constructs a new GcsOutputResult. + * @memberof google.cloud.retail.v2beta + * @classdesc Represents a GcsOutputResult. + * @implements IGcsOutputResult + * @constructor + * @param {google.cloud.retail.v2beta.IGcsOutputResult=} [properties] Properties to set + */ + function GcsOutputResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsOutputResult outputUri. + * @member {string} outputUri + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @instance + */ + GcsOutputResult.prototype.outputUri = ""; + + /** + * Creates a new GcsOutputResult instance using the specified properties. + * @function create + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {google.cloud.retail.v2beta.IGcsOutputResult=} [properties] Properties to set + * @returns {google.cloud.retail.v2beta.GcsOutputResult} GcsOutputResult instance + */ + GcsOutputResult.create = function create(properties) { + return new GcsOutputResult(properties); + }; + + /** + * Encodes the specified GcsOutputResult message. Does not implicitly {@link google.cloud.retail.v2beta.GcsOutputResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {google.cloud.retail.v2beta.IGcsOutputResult} message GcsOutputResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsOutputResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.outputUri != null && Object.hasOwnProperty.call(message, "outputUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUri); + return writer; + }; + + /** + * Encodes the specified GcsOutputResult message, length delimited. Does not implicitly {@link google.cloud.retail.v2beta.GcsOutputResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {google.cloud.retail.v2beta.IGcsOutputResult} message GcsOutputResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsOutputResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsOutputResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.retail.v2beta.GcsOutputResult} GcsOutputResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsOutputResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.retail.v2beta.GcsOutputResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.outputUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsOutputResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.retail.v2beta.GcsOutputResult} GcsOutputResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsOutputResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsOutputResult message. + * @function verify + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsOutputResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + if (!$util.isString(message.outputUri)) + return "outputUri: string expected"; + return null; + }; + + /** + * Creates a GcsOutputResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.retail.v2beta.GcsOutputResult} GcsOutputResult + */ + GcsOutputResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.retail.v2beta.GcsOutputResult) + return object; + var message = new $root.google.cloud.retail.v2beta.GcsOutputResult(); + if (object.outputUri != null) + message.outputUri = String(object.outputUri); + return message; + }; + + /** + * Creates a plain object from a GcsOutputResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {google.cloud.retail.v2beta.GcsOutputResult} message GcsOutputResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsOutputResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.outputUri = ""; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + object.outputUri = message.outputUri; + return object; + }; + + /** + * Converts this GcsOutputResult to JSON. + * @function toJSON + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @instance + * @returns {Object.} JSON object + */ + GcsOutputResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsOutputResult + * @function getTypeUrl + * @memberof google.cloud.retail.v2beta.GcsOutputResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsOutputResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.retail.v2beta.GcsOutputResult"; + }; + + return GcsOutputResult; + })(); + v2beta.Model = (function() { /** @@ -130728,6 +131325,7 @@ * @interface IWriteUserEventRequest * @property {string|null} [parent] WriteUserEventRequest parent * @property {google.cloud.retail.v2beta.IUserEvent|null} [userEvent] WriteUserEventRequest userEvent + * @property {boolean|null} [writeAsync] WriteUserEventRequest writeAsync */ /** @@ -130761,6 +131359,14 @@ */ WriteUserEventRequest.prototype.userEvent = null; + /** + * WriteUserEventRequest writeAsync. + * @member {boolean} writeAsync + * @memberof google.cloud.retail.v2beta.WriteUserEventRequest + * @instance + */ + WriteUserEventRequest.prototype.writeAsync = false; + /** * Creates a new WriteUserEventRequest instance using the specified properties. * @function create @@ -130789,6 +131395,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.userEvent != null && Object.hasOwnProperty.call(message, "userEvent")) $root.google.cloud.retail.v2beta.UserEvent.encode(message.userEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.writeAsync != null && Object.hasOwnProperty.call(message, "writeAsync")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.writeAsync); return writer; }; @@ -130831,6 +131439,10 @@ message.userEvent = $root.google.cloud.retail.v2beta.UserEvent.decode(reader, reader.uint32()); break; } + case 3: { + message.writeAsync = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -130874,6 +131486,9 @@ if (error) return "userEvent." + error; } + if (message.writeAsync != null && message.hasOwnProperty("writeAsync")) + if (typeof message.writeAsync !== "boolean") + return "writeAsync: boolean expected"; return null; }; @@ -130896,6 +131511,8 @@ throw TypeError(".google.cloud.retail.v2beta.WriteUserEventRequest.userEvent: object expected"); message.userEvent = $root.google.cloud.retail.v2beta.UserEvent.fromObject(object.userEvent); } + if (object.writeAsync != null) + message.writeAsync = Boolean(object.writeAsync); return message; }; @@ -130915,11 +131532,14 @@ if (options.defaults) { object.parent = ""; object.userEvent = null; + object.writeAsync = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.userEvent != null && message.hasOwnProperty("userEvent")) object.userEvent = $root.google.cloud.retail.v2beta.UserEvent.toObject(message.userEvent, options); + if (message.writeAsync != null && message.hasOwnProperty("writeAsync")) + object.writeAsync = message.writeAsync; return object; }; @@ -130958,10 +131578,12 @@ * Properties of a CollectUserEventRequest. * @memberof google.cloud.retail.v2beta * @interface ICollectUserEventRequest + * @property {string|null} [prebuiltRule] CollectUserEventRequest prebuiltRule * @property {string|null} [parent] CollectUserEventRequest parent * @property {string|null} [userEvent] CollectUserEventRequest userEvent * @property {string|null} [uri] CollectUserEventRequest uri * @property {number|Long|null} [ets] CollectUserEventRequest ets + * @property {string|null} [rawJson] CollectUserEventRequest rawJson */ /** @@ -130979,6 +131601,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * CollectUserEventRequest prebuiltRule. + * @member {string|null|undefined} prebuiltRule + * @memberof google.cloud.retail.v2beta.CollectUserEventRequest + * @instance + */ + CollectUserEventRequest.prototype.prebuiltRule = null; + /** * CollectUserEventRequest parent. * @member {string} parent @@ -131011,6 +131641,28 @@ */ CollectUserEventRequest.prototype.ets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * CollectUserEventRequest rawJson. + * @member {string} rawJson + * @memberof google.cloud.retail.v2beta.CollectUserEventRequest + * @instance + */ + CollectUserEventRequest.prototype.rawJson = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CollectUserEventRequest conversionRule. + * @member {"prebuiltRule"|undefined} conversionRule + * @memberof google.cloud.retail.v2beta.CollectUserEventRequest + * @instance + */ + Object.defineProperty(CollectUserEventRequest.prototype, "conversionRule", { + get: $util.oneOfGetter($oneOfFields = ["prebuiltRule"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CollectUserEventRequest instance using the specified properties. * @function create @@ -131043,6 +131695,10 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); if (message.ets != null && Object.hasOwnProperty.call(message, "ets")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.ets); + if (message.rawJson != null && Object.hasOwnProperty.call(message, "rawJson")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.rawJson); + if (message.prebuiltRule != null && Object.hasOwnProperty.call(message, "prebuiltRule")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.prebuiltRule); return writer; }; @@ -131077,6 +131733,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 6: { + message.prebuiltRule = reader.string(); + break; + } case 1: { message.parent = reader.string(); break; @@ -131093,6 +131753,10 @@ message.ets = reader.int64(); break; } + case 5: { + message.rawJson = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -131128,6 +131792,12 @@ CollectUserEventRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.prebuiltRule != null && message.hasOwnProperty("prebuiltRule")) { + properties.conversionRule = 1; + if (!$util.isString(message.prebuiltRule)) + return "prebuiltRule: string expected"; + } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; @@ -131140,6 +131810,9 @@ if (message.ets != null && message.hasOwnProperty("ets")) if (!$util.isInteger(message.ets) && !(message.ets && $util.isInteger(message.ets.low) && $util.isInteger(message.ets.high))) return "ets: integer|Long expected"; + if (message.rawJson != null && message.hasOwnProperty("rawJson")) + if (!$util.isString(message.rawJson)) + return "rawJson: string expected"; return null; }; @@ -131155,6 +131828,8 @@ if (object instanceof $root.google.cloud.retail.v2beta.CollectUserEventRequest) return object; var message = new $root.google.cloud.retail.v2beta.CollectUserEventRequest(); + if (object.prebuiltRule != null) + message.prebuiltRule = String(object.prebuiltRule); if (object.parent != null) message.parent = String(object.parent); if (object.userEvent != null) @@ -131170,6 +131845,8 @@ message.ets = object.ets; else if (typeof object.ets === "object") message.ets = new $util.LongBits(object.ets.low >>> 0, object.ets.high >>> 0).toNumber(); + if (object.rawJson != null) + message.rawJson = String(object.rawJson); return message; }; @@ -131195,6 +131872,7 @@ object.ets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.ets = options.longs === String ? "0" : 0; + object.rawJson = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -131207,6 +131885,13 @@ object.ets = options.longs === String ? String(message.ets) : message.ets; else object.ets = options.longs === String ? $util.Long.prototype.toString.call(message.ets) : options.longs === Number ? new $util.LongBits(message.ets.low >>> 0, message.ets.high >>> 0).toNumber() : message.ets; + if (message.rawJson != null && message.hasOwnProperty("rawJson")) + object.rawJson = message.rawJson; + if (message.prebuiltRule != null && message.hasOwnProperty("prebuiltRule")) { + object.prebuiltRule = message.prebuiltRule; + if (options.oneofs) + object.conversionRule = "prebuiltRule"; + } return object; }; diff --git a/packages/google-cloud-retail/protos/protos.json b/packages/google-cloud-retail/protos/protos.json index d08fabb0d56..442b27bfea2 100644 --- a/packages/google-cloud-retail/protos/protos.json +++ b/packages/google-cloud-retail/protos/protos.json @@ -9088,6 +9088,10 @@ "exactSearchableOption": { "type": "ExactSearchableOption", "id": 11 + }, + "retrievableOption": { + "type": "RetrievableOption", + "id": 12 } }, "nested": { @@ -9125,6 +9129,13 @@ "EXACT_SEARCHABLE_ENABLED": 1, "EXACT_SEARCHABLE_DISABLED": 2 } + }, + "RetrievableOption": { + "values": { + "RETRIEVABLE_OPTION_UNSPECIFIED": 0, + "RETRIEVABLE_ENABLED": 1, + "RETRIEVABLE_DISABLED": 2 + } } } }, @@ -9253,6 +9264,23 @@ "languageCode": { "type": "string", "id": 5 + }, + "feeds": { + "rule": "repeated", + "type": "MerchantCenterFeedFilter", + "id": 6 + } + } + }, + "MerchantCenterFeedFilter": { + "fields": { + "primaryFeedId": { + "type": "int64", + "id": 1 + }, + "primaryFeedName": { + "type": "string", + "id": 2 } } }, @@ -10292,7 +10320,10 @@ }, "retrievableFields": { "type": "google.protobuf.FieldMask", - "id": 30 + "id": 30, + "options": { + "deprecated": true + } }, "variants": { "rule": "repeated", @@ -11919,6 +11950,11 @@ "rule": "repeated", "type": "BigQueryOutputResult", "id": 1 + }, + "gcsResult": { + "rule": "repeated", + "type": "GcsOutputResult", + "id": 2 } } }, @@ -11934,6 +11970,14 @@ } } }, + "GcsOutputResult": { + "fields": { + "outputUri": { + "type": "string", + "id": 1 + } + } + }, "Model": { "options": { "(google.api.resource).type": "retail.googleapis.com/Model", @@ -13622,11 +13666,26 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "writeAsync": { + "type": "bool", + "id": 3 } } }, "CollectUserEventRequest": { + "oneofs": { + "conversionRule": { + "oneof": [ + "prebuiltRule" + ] + } + }, "fields": { + "prebuiltRule": { + "type": "string", + "id": 6 + }, "parent": { "type": "string", "id": 1, @@ -13648,6 +13707,10 @@ "ets": { "type": "int64", "id": 4 + }, + "rawJson": { + "type": "string", + "id": 5 } } }, 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 78cc60aea4a..f995510bf2b 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 @@ -60,8 +60,9 @@ function main(catalog, query) { */ // const languageCodes = 'abc123' /** - * The device type context for completion suggestions. - * It is useful to apply different suggestions on different device types, e.g. + * The device type context for completion suggestions. We recommend that you + * leave this field empty. + * It can apply different suggestions on different device types, e.g. * `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device * types. * Supported formats: 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 ec652b810ce..b67cb080f5b 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 @@ -38,7 +38,7 @@ function main(placement, userEvent) { * The ID of the Recommendations AI serving config or placement. * Before you can request predictions from your model, you must create at * least one serving config or placement for it. For more information, see - * Managing serving configurations + * Manage serving configs * (https://cloud.google.com/retail/docs/manage-configs). * The full list of available serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs @@ -89,12 +89,11 @@ function main(placement, userEvent) { * * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * * filterOutOfStockItems tag=(-"promotional") * * filterOutOfStockItems - * If your filter blocks all prediction results, the API will return generic - * (unfiltered) popular products. If you only want results strictly matching - * the filters, set `strictFiltering` to True in `PredictRequest.params` to - * receive empty results instead. - * Note that the API will never return items with storageStatus of "EXPIRED" - * or "DELETED" regardless of filter choices. + * If your filter blocks all prediction results, the API will return *no* + * results. If instead you want empty result sets to return generic + * (unfiltered) popular products, set `strictFiltering` to False in + * `PredictRequest.params`. Note that the API will never return items with + * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. * If `filterSyntaxV2` is set to true under the `params` field, then * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: @@ -119,7 +118,7 @@ function main(placement, userEvent) { * * `returnScore`: Boolean. If set to true, the prediction 'score' * corresponding to each returned product will be set in the * `results.metadata` field in the prediction response. The given - * 'score' indicates the probability of an product being clicked/purchased + * 'score' indicates the probability of a product being clicked/purchased * given the user's context and history. * * `strictFiltering`: Boolean. True by default. If set to false, the service * will return generic (unfiltered) popular products instead of empty if 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 1de2864e0d3..5ed3060dbcf 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 @@ -33,7 +33,7 @@ function main(placement, visitorId) { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. */ // const placement = 'abc123' diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json index bbe235d7eea..effcbad9adf 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json @@ -554,7 +554,7 @@ "segments": [ { "start": 25, - "end": 114, + "end": 115, "type": "FULL" } ], @@ -1190,7 +1190,7 @@ "segments": [ { "start": 25, - "end": 178, + "end": 177, "type": "FULL" } ], @@ -2254,7 +2254,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 66, "type": "FULL" } ], @@ -2270,6 +2270,10 @@ { "name": "user_event", "type": ".google.cloud.retail.v2beta.UserEvent" + }, + { + "name": "write_async", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.retail.v2beta.UserEvent", @@ -2298,7 +2302,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 85, "type": "FULL" } ], @@ -2307,6 +2311,10 @@ "fullName": "google.cloud.retail.v2beta.UserEventService.CollectUserEvent", "async": true, "parameters": [ + { + "name": "prebuilt_rule", + "type": "TYPE_STRING" + }, { "name": "parent", "type": "TYPE_STRING" @@ -2322,6 +2330,10 @@ { "name": "ets", "type": "TYPE_INT64" + }, + { + "name": "raw_json", + "type": "TYPE_STRING" } ], "resultType": ".google.api.HttpBody", 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 ad837df15dc..249668d0db4 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 @@ -28,6 +28,11 @@ function main(parent, userEvent) { * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ + /** + * The prebuilt rule name that can convert a specific type of raw_json. + * For example: "default_schema/v1.0" + */ + // const prebuiltRule = 'abc123' /** * Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. @@ -51,6 +56,13 @@ function main(parent, userEvent) { * payload bytes. */ // const ets = 1234 + /** + * An arbitrary serialized JSON string that contains necessary information + * that can comprise a user event. When this field is specified, the + * user_event field will be ignored. Note: line-delimited JSON is not + * supported, a single JSON only. + */ + // const rawJson = 'abc123' // Imports the Retail library const {UserEventServiceClient} = require('@google-cloud/retail').v2beta; 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 9e2d4d93808..38a79e5abf9 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 @@ -37,6 +37,13 @@ function main(parent, userEvent) { * Required. User event to write. */ // const userEvent = {} + /** + * If set to true, the user event will be written asynchronously after + * validation, and the API will respond without waiting for the write. + * Therefore, silent failures can occur even if the API returns success. In + * case of silent failures, error messages can be found in Stackdriver logs. + */ + // const writeAsync = true // Imports the Retail library const {UserEventServiceClient} = require('@google-cloud/retail').v2beta; 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 7385245634a..b81d3d61926 100644 --- a/packages/google-cloud-retail/src/v2beta/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/completion_service_client.ts @@ -433,8 +433,10 @@ export class CompletionServiceClient { * Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum * number of language codes is 3. * @param {string} request.deviceType - * The device type context for completion suggestions. - * It is useful to apply different suggestions on different device types, e.g. + * The device type context for completion suggestions. We recommend that you + * leave this field empty. + * + * It can apply different suggestions on different device types, e.g. * `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device * types. * diff --git a/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts b/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts index 2ae86c042c5..6bd04096201 100644 --- a/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts @@ -393,7 +393,7 @@ export class PredictionServiceClient { * The ID of the Recommendations AI serving config or placement. * Before you can request predictions from your model, you must create at * least one serving config or placement for it. For more information, see - * [Managing serving configurations] + * [Manage serving configs] * (https://cloud.google.com/retail/docs/manage-configs). * * The full list of available serving configs can be seen at @@ -444,12 +444,11 @@ export class PredictionServiceClient { * * filterOutOfStockItems tag=(-"promotional") * * filterOutOfStockItems * - * If your filter blocks all prediction results, the API will return generic - * (unfiltered) popular products. If you only want results strictly matching - * the filters, set `strictFiltering` to True in `PredictRequest.params` to - * receive empty results instead. - * Note that the API will never return items with storageStatus of "EXPIRED" - * or "DELETED" regardless of filter choices. + * If your filter blocks all prediction results, the API will return *no* + * results. If instead you want empty result sets to return generic + * (unfiltered) popular products, set `strictFiltering` to False in + * `PredictRequest.params`. Note that the API will never return items with + * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. * * If `filterSyntaxV2` is set to true under the `params` field, then * attribute-based expressions are expected instead of the above described @@ -474,7 +473,7 @@ export class PredictionServiceClient { * * `returnScore`: Boolean. If set to true, the prediction 'score' * corresponding to each returned product will be set in the * `results.metadata` field in the prediction response. The given - * 'score' indicates the probability of an product being clicked/purchased + * 'score' indicates the probability of a product being clicked/purchased * given the user's context and history. * * `strictFiltering`: Boolean. True by default. If set to false, the service * will return generic (unfiltered) popular products instead of empty if 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 29fc5edeecd..3e966d8fd2c 100644 --- a/packages/google-cloud-retail/src/v2beta/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/search_service_client.ts @@ -411,7 +411,7 @@ export class SearchServiceClient { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. * @param {string} request.branch * The branch resource name, such as @@ -726,7 +726,7 @@ export class SearchServiceClient { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. * @param {string} request.branch * The branch resource name, such as @@ -997,7 +997,7 @@ export class SearchServiceClient { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. * @param {string} request.branch * The branch resource name, such as 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 7cebffb33f3..3a234db7b19 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 @@ -429,6 +429,11 @@ export class UserEventServiceClient { * `projects/1234/locations/global/catalogs/default_catalog`. * @param {google.cloud.retail.v2beta.UserEvent} request.userEvent * Required. User event to write. + * @param {boolean} request.writeAsync + * If set to true, the user event will be written asynchronously after + * validation, and the API will respond without waiting for the write. + * Therefore, silent failures can occur even if the API returns success. In + * case of silent failures, error messages can be found in Stackdriver logs. * @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. @@ -522,6 +527,9 @@ export class UserEventServiceClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.prebuiltRule + * The prebuilt rule name that can convert a specific type of raw_json. + * For example: "default_schema/v1.0" * @param {string} request.parent * Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. @@ -537,6 +545,11 @@ export class UserEventServiceClient { * The event timestamp in milliseconds. This prevents browser caching of * otherwise identical get requests. The name is abbreviated to reduce the * payload bytes. + * @param {string} request.rawJson + * An arbitrary serialized JSON string that contains necessary information + * that can comprise a user event. When this field is specified, the + * user_event field will be ignored. Note: line-delimited JSON is not + * supported, a single JSON only. * @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.