From 9c00a2f0dc8cc1c8d93b938fc097851335c08692 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 7 Oct 2020 12:14:19 -0700 Subject: [PATCH] Sync the public proto up-to-date with the recent changes PiperOrigin-RevId: 335923930 --- google/cloud/retail/v2/catalog.proto | 4 +- google/cloud/retail/v2/common.proto | 20 +++--- google/cloud/retail/v2/import_config.proto | 40 ++++++------ .../cloud/retail/v2/prediction_service.proto | 6 +- google/cloud/retail/v2/product.proto | 27 ++++---- google/cloud/retail/v2/product_service.proto | 24 +------ google/cloud/retail/v2/purge_config.proto | 62 +++---------------- google/cloud/retail/v2/retail_v2.yaml | 15 ++++- google/cloud/retail/v2/user_event.proto | 16 ++--- .../cloud/retail/v2/user_event_service.proto | 15 ++--- google/cloud/retail/v2alpha/catalog.proto | 4 +- google/cloud/retail/v2alpha/common.proto | 20 +++--- .../cloud/retail/v2alpha/export_config.proto | 33 +++------- .../cloud/retail/v2alpha/import_config.proto | 40 ++++++------ .../retail/v2alpha/prediction_service.proto | 6 +- google/cloud/retail/v2alpha/product.proto | 31 +++++----- .../retail/v2alpha/product_service.proto | 7 +-- .../cloud/retail/v2alpha/purge_config.proto | 40 ++---------- google/cloud/retail/v2alpha/user_event.proto | 16 ++--- .../retail/v2alpha/user_event_service.proto | 15 ++--- google/cloud/retail/v2beta/catalog.proto | 4 +- google/cloud/retail/v2beta/common.proto | 20 +++--- .../cloud/retail/v2beta/export_config.proto | 33 +++------- .../cloud/retail/v2beta/import_config.proto | 40 ++++++------ .../retail/v2beta/prediction_service.proto | 6 +- google/cloud/retail/v2beta/product.proto | 27 ++++---- .../cloud/retail/v2beta/product_service.proto | 7 +-- google/cloud/retail/v2beta/purge_config.proto | 40 ++---------- google/cloud/retail/v2beta/user_event.proto | 16 ++--- .../retail/v2beta/user_event_service.proto | 15 ++--- 30 files changed, 253 insertions(+), 396 deletions(-) diff --git a/google/cloud/retail/v2/catalog.proto b/google/cloud/retail/v2/catalog.proto index 1812de48..da9e8fd2 100644 --- a/google/cloud/retail/v2/catalog.proto +++ b/google/cloud/retail/v2/catalog.proto @@ -89,8 +89,8 @@ message Catalog { // Required. Immutable. The catalog display name. // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. string display_name = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE diff --git a/google/cloud/retail/v2/common.proto b/google/cloud/retail/v2/common.proto index ed32da99..fa26670c 100644 --- a/google/cloud/retail/v2/common.proto +++ b/google/cloud/retail/v2/common.proto @@ -36,12 +36,12 @@ message CustomAttribute { // "green"]` when the key is "color". // // At most 400 values are allowed. Empty values are not allowed. Each value - // must be a UTF-8 encoded string with a length limit of 256 bytes. Otherwise, - // an INVALID_ARGUMENT error is returned. + // must be a UTF-8 encoded string with a length limit of 256 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. // // Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or // [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. - // Otherwise, a FAILED_PRECONDITION error is returned. + // Otherwise, a INVALID_ARGUMENT error is returned. repeated string text = 1; // The numerical values of this custom attribute. For example, `[2.3, 15.4]` @@ -52,7 +52,7 @@ message CustomAttribute { // // Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or // [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set. - // Otherwise, a FAILED_PRECONDITION error is returned. + // Otherwise, a INVALID_ARGUMENT error is returned. repeated double numbers = 2; } @@ -60,8 +60,8 @@ message CustomAttribute { message Image { // Required. URI of the image. // - // This field must be a valid UTF-8 encoded URI with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a valid UTF-8 encoded URI with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [image_link](https://support.google.com/merchants/answer/6324350). @@ -118,8 +118,8 @@ message UserInfo { // Highly recommended for logged-in users. Unique identifier for logged-in // user, such as a user name. // - // The field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. string user_id = 1; // The end user's IP address. This field is used to extract location @@ -138,8 +138,8 @@ message UserInfo { // User agent as included in the HTTP header. // - // The field must be a UTF-8 encoded string with a length limit of 1 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // This should not be set when using the client side event reporting with // GTM or JavaScript tag in diff --git a/google/cloud/retail/v2/import_config.proto b/google/cloud/retail/v2/import_config.proto index 6b93bd48..d7c508a1 100644 --- a/google/cloud/retail/v2/import_config.proto +++ b/google/cloud/retail/v2/import_config.proto @@ -70,19 +70,22 @@ message GcsSource { // BigQuery source import data from. message BigQuerySource { - // The project id (can be project # or id) that the BigQuery source is in. If - // not specified, inherits the project id from the parent request. + // The project id (can be project # or id) that the BigQuery source is in with + // a length limit of 128 characters. If not specified, inherits the project + // id from the parent request. string project_id = 5; - // Required. The BigQuery data set to copy the data from. + // Required. The BigQuery data set to copy the data from with a length limit + // of 1,024 characters. string dataset_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The BigQuery table to copy the data from. + // Required. The BigQuery table to copy the data from with a length limit of + // 1,024 characters. string table_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Intermediate Cloud Storage directory used for the import. Can be specified - // if one wants to have the BigQuery export to a specific Cloud Storage - // directory. + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // BigQuery export to a specific Cloud Storage directory. string gcs_staging_dir = 3; // The schema to use when parsing the data from the source. @@ -109,14 +112,15 @@ message BigQuerySource { // The inline source for the input config for ImportProducts method. message ProductInlineSource { - // A list of products to update/create. Recommended max of 10k items. - repeated Product products = 1; + // Required. A list of products to update/create. Recommended max of 10k + // items. + repeated Product products = 1 [(google.api.field_behavior) = REQUIRED]; } // The inline source for the input config for ImportUserEvents method. message UserEventInlineSource { - // A list of user events to import. Recommended max of 10k items. - repeated UserEvent user_events = 1; + // Required. A list of user events to import. Recommended max of 10k items. + repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED]; } // Configuration of destination for Import related errors. @@ -160,7 +164,8 @@ message ImportUserEventsRequest { UserEventInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; - // The desired location of errors incurred during the Import. + // The desired location of errors incurred during the Import. Cannot be set + // for inline user event imports. ImportErrorsConfig errors_config = 3; } @@ -204,21 +209,18 @@ message ImportMetadata { pattern: "operations/{operation}" }; - // Name of the operation. - string name = 1; - // Operation create time. - google.protobuf.Timestamp create_time = 2; + google.protobuf.Timestamp create_time = 1; // Operation last update time. If the operation is done, this is also the // finish time. - google.protobuf.Timestamp update_time = 3; + google.protobuf.Timestamp update_time = 2; // Count of entries that were processed successfully. - int64 success_count = 4; + int64 success_count = 3; // Count of entries that encountered errors while processing. - int64 failure_count = 5; + int64 failure_count = 4; } // Response of the diff --git a/google/cloud/retail/v2/prediction_service.proto b/google/cloud/retail/v2/prediction_service.proto index 5221b63d..c0cd6640 100644 --- a/google/cloud/retail/v2/prediction_service.proto +++ b/google/cloud/retail/v2/prediction_service.proto @@ -97,15 +97,15 @@ message PredictRequest { // The previous PredictResponse.next_page_token. string page_token = 4; - // Filter for restricting prediction results. Accepts values for - // tags and the `filterOutOfStockItems` flag. + // Filter for restricting prediction results with a length limit of 5,000 + // characters. Accepts values for tags and the `filterOutOfStockItems` flag. // // * Tag expressions. Restricts predictions to products that match all of the // specified tags. Boolean operators `OR` and `NOT` are supported if the // expression is enclosed in parentheses, and must be separated from the // tag values by a space. `-"tagA"` is also supported and is equivalent to // `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings - // with a size limit of 1 KiB. + // with a size limit of 1,000 characters. // // * filterOutOfStockItems. Restricts predictions to products that do not // have a diff --git a/google/cloud/retail/v2/product.proto b/google/cloud/retail/v2/product.proto index f0bdc4f8..16ec491a 100644 --- a/google/cloud/retail/v2/product.proto +++ b/google/cloud/retail/v2/product.proto @@ -20,7 +20,6 @@ import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2/common.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -81,8 +80,8 @@ message Product { // // "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1". // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. // // Google Merchant Center property // [id](https://support.google.com/merchants/answer/6324405). @@ -98,7 +97,7 @@ message Product { // error is returned. // // Should only be set for [Type.VARIANT][] - // [Product][google.cloud.retail.v2.Product]s. A maximum of 1000 products are + // [Product][google.cloud.retail.v2.Product]s. A maximum of 2000 products are // allowed to share the same [Type.PRIMARY][] // [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT // error is returned. @@ -137,8 +136,8 @@ message Product { // // At most 250 values are allowed per // [Product][google.cloud.retail.v2.Product]. Empty values are not allowed. - // Each value must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // Each value must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // @@ -149,8 +148,8 @@ message Product { // Required. Product title. // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. // // Google Merchant Center property // [title](https://support.google.com/merchants/answer/6324415). Schema.org @@ -159,8 +158,8 @@ message Product { // Product description. // - // This field must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [description](https://support.google.com/merchants/answer/6324468). @@ -204,8 +203,8 @@ message Product { // // At most 250 values are allowed per // [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8 - // encoded string with a length limit of 1 KiB. Otherwise, an INVALID_ARGUMENT - // error is returned. + // encoded string with a length limit of 1,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. // // This tag can be used for filtering recommendation results by passing the // tag as part of the @@ -239,8 +238,8 @@ message Product { // Canonical URL directly linking to the product detail page. // - // This field must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [link](https://support.google.com/merchants/answer/6324416). diff --git a/google/cloud/retail/v2/product_service.proto b/google/cloud/retail/v2/product_service.proto index 34a4ef84..1ae3b3cb 100644 --- a/google/cloud/retail/v2/product_service.proto +++ b/google/cloud/retail/v2/product_service.proto @@ -78,26 +78,6 @@ service ProductService { option (google.api.method_signature) = "name"; } - // Permanently deletes all [Product][google.cloud.retail.v2.Product]s under a - // branch. - // - // Depending on the number of [Product][google.cloud.retail.v2.Product]s, this - // operation could take hours to complete. To get a sample of - // [Product][google.cloud.retail.v2.Product]s that would be deleted, set - // [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] - // to false. - rpc PurgeProducts(PurgeProductsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:purge" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.retail.v2.PurgeProductsResponse" - metadata_type: "google.cloud.retail.v2.PurgeMetadata" - }; - } - // Bulk import of multiple [Product][google.cloud.retail.v2.Product]s. // // Request processing may be synchronous. No partial updating is supported. @@ -144,8 +124,8 @@ message CreateProductRequest { // [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 bytes. - // Otherwise, an INVALID_ARGUMENT 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. string product_id = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/retail/v2/purge_config.proto b/google/cloud/retail/v2/purge_config.proto index 187e6082..51586ad2 100644 --- a/google/cloud/retail/v2/purge_config.proto +++ b/google/cloud/retail/v2/purge_config.proto @@ -18,9 +18,6 @@ package google.cloud.retail.v2; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; -import "google/cloud/retail/v2/product.proto"; -import "google/cloud/retail/v2/user_event.proto"; -import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2"; option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2;retail"; @@ -33,54 +30,18 @@ option ruby_package = "Google::Cloud::Retail::V2"; // Metadata related to the progress of the Purge operation. // This will be returned by the google.longrunning.Operation.metadata field. -message PurgeMetadata { - // The ID of the request / operation. - string operation = 1; +message PurgeMetadata {} - // Operation create time. - google.protobuf.Timestamp create_time = 2; -} - -// Request message for PurgeProducts method. -message PurgeProductsRequest { - // Required. The resource name of the catalog under which the products are +// Request message for PurgeUserEvents method. +message PurgeUserEventsRequest { + // Required. The resource name of the catalog under which the events are // created. The format is // "projects/${projectId}/locations/global/catalogs/${catalogId}" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Filter matching the products to be purged. Only supported value - // at the moment is "*" (all items). - string filter = 2 [(google.api.field_behavior) = REQUIRED]; - - // The default value is false. Override this flag to true to - // actually perform the purge. If the field is not set to true, a sampling of - // products to be deleted will be returned. - bool force = 3; -} - -// Response of the PurgeProductsRequest. If the long running operation is -// successfully done, then this message is returned by the -// google.longrunning.Operations.response field. -message PurgeProductsResponse { - // The total count of products purged as a result of the operation. - int64 purged_count = 1; - // A random sampling of products deleted (or will be deleted) depending - // on the `force` property in the request. Max of 500 items will be returned. - // Currently, this is only populated if force=false. - repeated Product products_sample = 2; -} - -// Request message for PurgeUserEvents method. -message PurgeUserEventsRequest { - // Required. The resource name of the event_store under which the events are - // created. The format is - // - // "projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}" - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The filter string to specify the events to be deleted. Empty - // string filter is not allowed. The eligible fields - // for filtering are: + // Required. The filter string to specify the events to be deleted with a + // length limit of 5,000 characters. Empty string filter is not allowed. The + // eligible fields for filtering are: // // * `eventType`: UserEvent.eventType field of type string. // * `eventTime`: in ISO 8601 "zulu" format. @@ -101,11 +62,6 @@ message PurgeUserEventsRequest { // // The filtering fields are assumed to have an implicit AND. string filter = 2 [(google.api.field_behavior) = REQUIRED]; - - // The default value is false. Override this flag to true to - // actually perform the purge. If the field is not set to true, a sampling of - // events to be deleted will be returned. - bool force = 3; } // Response of the PurgeUserEventsRequest. If the long running operation is @@ -114,8 +70,4 @@ message PurgeUserEventsRequest { message PurgeUserEventsResponse { // The total count of events purged as a result of the operation. int64 purged_events_count = 1; - - // A sampling of events deleted (or will be deleted) depending on the `force` - // property in the request. Max of 500 items will be returned. - repeated UserEvent user_events_sample = 2; } diff --git a/google/cloud/retail/v2/retail_v2.yaml b/google/cloud/retail/v2/retail_v2.yaml index bf06606b..4f4dca3b 100644 --- a/google/cloud/retail/v2/retail_v2.yaml +++ b/google/cloud/retail/v2/retail_v2.yaml @@ -38,9 +38,14 @@ backend: http: rules: - selector: google.longrunning.Operations.GetOperation - get: '/v2/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}' + get: '/v2/{name=projects/*/locations/*/operations/*}' + additional_bindings: + - get: '/v2/{name=projects/*/locations/*/catalogs/*/operations/*}' + - get: '/v2/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}' - selector: google.longrunning.Operations.ListOperations - get: '/v2/{name=projects/*/locations/*/catalogs/*/branches/*}/operations' + get: '/v2/{name=projects/*/locations/*}/operations' + additional_bindings: + - get: '/v2/{name=projects/*/locations/*/catalogs/*}/operations' authentication: rules: @@ -64,7 +69,11 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform - - selector: 'google.longrunning.Operations.*' + - selector: google.longrunning.Operations.GetOperation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.longrunning.Operations.ListOperations oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/retail/v2/user_event.proto b/google/cloud/retail/v2/user_event.proto index ba9c813e..7e90f9c0 100644 --- a/google/cloud/retail/v2/user_event.proto +++ b/google/cloud/retail/v2/user_event.proto @@ -52,8 +52,8 @@ message UserEvent { // identify a visitor on a single device. This unique identifier should not // change if the visitor log in/out of the website. // - // The field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. string visitor_id = 2 [(google.api.field_behavior) = REQUIRED]; // Only required for @@ -125,8 +125,8 @@ message UserEvent { // The user's search query. // - // The value must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The value must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Required for `search` events. Other event types should not set this field. // Otherwise, an INVALID_ARGUMENT error is returned. @@ -151,7 +151,8 @@ message UserEvent { // Complete url (window.location.href) of the user's current page. // When using the client side event reporting with JavaScript pixel and Google - // Tag Manager, this value is filled in automatically. Maximum length 5KB. + // Tag Manager, this value is filled in automatically. Maximum length 5,000 + // characters. string uri = 13; // The referrer url of the current page. When using @@ -187,7 +188,8 @@ message UserEvent { // Detailed product information associated with a user event. message ProductDetail { // Required. [Product][google.cloud.retail.v2.Product] information. - // Only [Product][id] field must to be set. + // Only [Product][id] field is used when ingesting an event, all other product + // fields are ignored as we will look them up from the catalog. Product product = 1 [(google.api.field_behavior) = REQUIRED]; // Quantity of the product associated with the user event. For @@ -199,7 +201,7 @@ message ProductDetail { // A transaction represents the entire purchase transaction. message PurchaseTransaction { - // The transaction ID with a length limit of 128 bytes. + // The transaction ID with a length limit of 128 characters. string id = 1; // Required. Total revenue or grand total associated with the transaction. diff --git a/google/cloud/retail/v2/user_event_service.proto b/google/cloud/retail/v2/user_event_service.proto index 8f2f96b0..f70386bf 100644 --- a/google/cloud/retail/v2/user_event_service.proto +++ b/google/cloud/retail/v2/user_event_service.proto @@ -116,7 +116,7 @@ service UserEventService { // Request message for WriteUserEvent method. message WriteUserEventRequest { - // Required. The parent eventStore resource name, such as + // Required. The parent catalog resource name, such as // "projects/1234/locations/global/catalogs/default_catalog". string parent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -126,17 +126,18 @@ message WriteUserEventRequest { // Request message for CollectUserEvent method. message CollectUserEventRequest { - // Required. The parent eventStore name, such as + // Required. The parent catalog name, such as // "projects/1234/locations/global/catalogs/default_catalog". string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. URL encoded UserEvent proto. + // Required. URL encoded UserEvent proto with a length limit of 2,000,000 + // characters. string user_event = 2 [(google.api.field_behavior) = REQUIRED]; - // The url including cgi-parameters but excluding the hash fragment. The URL - // must be truncated to 1.5K bytes to conservatively be under the 2K bytes. - // This is often more useful than the referer url, because many browsers only - // send the domain for 3rd party requests. + // The url including cgi-parameters but excluding the hash fragment with a + // length limit of 5,000 characters. This is often more useful than the + // referer url, because many browsers only send the domain for 3rd party + // requests. string uri = 3; // The event timestamp in milliseconds. This prevents browser caching of diff --git a/google/cloud/retail/v2alpha/catalog.proto b/google/cloud/retail/v2alpha/catalog.proto index 966b5098..396339dd 100644 --- a/google/cloud/retail/v2alpha/catalog.proto +++ b/google/cloud/retail/v2alpha/catalog.proto @@ -89,8 +89,8 @@ message Catalog { // Required. Immutable. The catalog display name. // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. string display_name = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE diff --git a/google/cloud/retail/v2alpha/common.proto b/google/cloud/retail/v2alpha/common.proto index 4f724a3a..0d2a3604 100644 --- a/google/cloud/retail/v2alpha/common.proto +++ b/google/cloud/retail/v2alpha/common.proto @@ -36,12 +36,12 @@ message CustomAttribute { // "green"]` when the key is "color". // // At most 400 values are allowed. Empty values are not allowed. Each value - // must be a UTF-8 encoded string with a length limit of 256 bytes. Otherwise, - // an INVALID_ARGUMENT error is returned. + // must be a UTF-8 encoded string with a length limit of 256 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. // // Exactly one of [text][google.cloud.retail.v2alpha.CustomAttribute.text] or // [numbers][google.cloud.retail.v2alpha.CustomAttribute.numbers] should be - // set. Otherwise, a FAILED_PRECONDITION error is returned. + // set. Otherwise, a INVALID_ARGUMENT error is returned. repeated string text = 1; // The numerical values of this custom attribute. For example, `[2.3, 15.4]` @@ -52,7 +52,7 @@ message CustomAttribute { // // Exactly one of [text][google.cloud.retail.v2alpha.CustomAttribute.text] or // [numbers][google.cloud.retail.v2alpha.CustomAttribute.numbers] should be - // set. Otherwise, a FAILED_PRECONDITION error is returned. + // set. Otherwise, a INVALID_ARGUMENT error is returned. repeated double numbers = 2; } @@ -60,8 +60,8 @@ message CustomAttribute { message Image { // Required. URI of the image. // - // This field must be a valid UTF-8 encoded URI with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a valid UTF-8 encoded URI with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [image_link](https://support.google.com/merchants/answer/6324350). @@ -118,8 +118,8 @@ message UserInfo { // Highly recommended for logged-in users. Unique identifier for logged-in // user, such as a user name. // - // The field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. string user_id = 1; // The end user's IP address. This field is used to extract location @@ -138,8 +138,8 @@ message UserInfo { // User agent as included in the HTTP header. // - // The field must be a UTF-8 encoded string with a length limit of 1 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // This should not be set when using the client side event reporting with // GTM or JavaScript tag in diff --git a/google/cloud/retail/v2alpha/export_config.proto b/google/cloud/retail/v2alpha/export_config.proto index ae517fe7..745d6ab8 100644 --- a/google/cloud/retail/v2alpha/export_config.proto +++ b/google/cloud/retail/v2alpha/export_config.proto @@ -79,14 +79,8 @@ message ExportProductsRequest { // "projects/1234/locations/global/catalogs/default_catalog/branches/default_branch" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency for expensive long running operations. - // Server-generated if unspecified. Up to 128 characters long. This is - // returned as google.longrunning.Operation.name in the response. - string request_id = 2; - // Required. The desired output location of the data. - OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; // Filtering expression to specify restrictions over // returned products. This is a sequence of terms, where each term applies @@ -120,7 +114,7 @@ message ExportProductsRequest { // expression is enclosed in parentheses, and must be separated from the // tag values by a space. `-"tagA"` is also supported and is equivalent // to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded - // strings with a size limit of 1 KiB. + // strings with a size limit of 1,000 characters. // // Some examples of valid filters expressions: // @@ -134,7 +128,7 @@ message ExportProductsRequest { // "2018-04-23T18:30:43.511Z" // * Example 4: lastModifiedTime > "2012-04-23T18:25:43.511Z" // * Example 5: availability = (IN_STOCK OR BACKORDER) - string filter = 4; + string filter = 3; } // Request message for ExportUserEvents method. @@ -142,14 +136,8 @@ message ExportUserEventsRequest { // Required. "projects/1234/locations/global/catalogs/default_catalog" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency for expensive long running operations. - // Server-generated if unspecified. Up to 128 characters long. This is - // returned as google.longrunning.Operation.name in the response. - string request_id = 2; - // Required. The desired output location of the data. - OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; // Filtering expression to specify restrictions over // returned events. This is a sequence of terms, where each term applies some @@ -185,25 +173,18 @@ message ExportUserEventsRequest { // * Example 4: eventTime > "2012-04-23T18:25:43.511Z" // * Example 5: eventType = (search OR impression) // * Example 6: eventsMissingCatalogItems - string filter = 4; + string filter = 3; } // Metadata related to the progress of the Export operation. This will be // returned by the google.longrunning.Operation.metadata field. message ExportMetadata { - // Name of the operation. - string name = 1; - - // Id of the request / operation. This is parroting back the requestId that - // was passed in the request. - string request_id = 2; - // Operation create time. - google.protobuf.Timestamp create_time = 3; + google.protobuf.Timestamp create_time = 1; // Operation last update time. If the operation is done, this is also the // finish time. - google.protobuf.Timestamp update_time = 4; + google.protobuf.Timestamp update_time = 2; } // Response of the ExportProductsRequest. If the long running diff --git a/google/cloud/retail/v2alpha/import_config.proto b/google/cloud/retail/v2alpha/import_config.proto index 8ab9e6d3..03475f90 100644 --- a/google/cloud/retail/v2alpha/import_config.proto +++ b/google/cloud/retail/v2alpha/import_config.proto @@ -70,19 +70,22 @@ message GcsSource { // BigQuery source import data from. message BigQuerySource { - // The project id (can be project # or id) that the BigQuery source is in. If - // not specified, inherits the project id from the parent request. + // The project id (can be project # or id) that the BigQuery source is in with + // a length limit of 128 characters. If not specified, inherits the project + // id from the parent request. string project_id = 5; - // Required. The BigQuery data set to copy the data from. + // Required. The BigQuery data set to copy the data from with a length limit + // of 1,024 characters. string dataset_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The BigQuery table to copy the data from. + // Required. The BigQuery table to copy the data from with a length limit of + // 1,024 characters. string table_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Intermediate Cloud Storage directory used for the import. Can be specified - // if one wants to have the BigQuery export to a specific Cloud Storage - // directory. + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // BigQuery export to a specific Cloud Storage directory. string gcs_staging_dir = 3; // The schema to use when parsing the data from the source. @@ -109,14 +112,15 @@ message BigQuerySource { // The inline source for the input config for ImportProducts method. message ProductInlineSource { - // A list of products to update/create. Recommended max of 10k items. - repeated Product products = 1; + // Required. A list of products to update/create. Recommended max of 10k + // items. + repeated Product products = 1 [(google.api.field_behavior) = REQUIRED]; } // The inline source for the input config for ImportUserEvents method. message UserEventInlineSource { - // A list of user events to import. Recommended max of 10k items. - repeated UserEvent user_events = 1; + // Required. A list of user events to import. Recommended max of 10k items. + repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED]; } // Configuration of destination for Import related errors. @@ -160,7 +164,8 @@ message ImportUserEventsRequest { UserEventInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; - // The desired location of errors incurred during the Import. + // The desired location of errors incurred during the Import. Cannot be set + // for inline user event imports. ImportErrorsConfig errors_config = 3; } @@ -204,21 +209,18 @@ message ImportMetadata { pattern: "operations/{operation}" }; - // Name of the operation. - string name = 1; - // Operation create time. - google.protobuf.Timestamp create_time = 2; + google.protobuf.Timestamp create_time = 1; // Operation last update time. If the operation is done, this is also the // finish time. - google.protobuf.Timestamp update_time = 3; + google.protobuf.Timestamp update_time = 2; // Count of entries that were processed successfully. - int64 success_count = 4; + int64 success_count = 3; // Count of entries that encountered errors while processing. - int64 failure_count = 5; + int64 failure_count = 4; } // Response of the diff --git a/google/cloud/retail/v2alpha/prediction_service.proto b/google/cloud/retail/v2alpha/prediction_service.proto index b6f16b7d..a66dac51 100644 --- a/google/cloud/retail/v2alpha/prediction_service.proto +++ b/google/cloud/retail/v2alpha/prediction_service.proto @@ -97,15 +97,15 @@ message PredictRequest { // The previous PredictResponse.next_page_token. string page_token = 4; - // Filter for restricting prediction results. Accepts values for - // tags and the `filterOutOfStockItems` flag. + // Filter for restricting prediction results with a length limit of 5,000 + // characters. Accepts values for tags and the `filterOutOfStockItems` flag. // // * Tag expressions. Restricts predictions to products that match all of the // specified tags. Boolean operators `OR` and `NOT` are supported if the // expression is enclosed in parentheses, and must be separated from the // tag values by a space. `-"tagA"` is also supported and is equivalent to // `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings - // with a size limit of 1 KiB. + // with a size limit of 1,000 characters. // // * filterOutOfStockItems. Restricts predictions to products that do not // have a diff --git a/google/cloud/retail/v2alpha/product.proto b/google/cloud/retail/v2alpha/product.proto index 704c10f7..dca6a520 100644 --- a/google/cloud/retail/v2alpha/product.proto +++ b/google/cloud/retail/v2alpha/product.proto @@ -20,7 +20,6 @@ import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/common.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -81,8 +80,8 @@ message Product { // // "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1". // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. // // Google Merchant Center property // [id](https://support.google.com/merchants/answer/6324405). @@ -99,7 +98,7 @@ message Product { // // Should only be set for // [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - // [Product][google.cloud.retail.v2alpha.Product]s. A maximum of 1000 products + // [Product][google.cloud.retail.v2alpha.Product]s. A maximum of 2000 products // are allowed to share the same // [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] // [Product][google.cloud.retail.v2alpha.Product]. Otherwise, an @@ -139,8 +138,8 @@ message Product { // // At most 250 values are allowed per // [Product][google.cloud.retail.v2alpha.Product]. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length limit of 5 - // KiB. Otherwise, an INVALID_ARGUMENT error is returned. + // allowed. Each value must be a UTF-8 encoded string with a length limit of + // 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // @@ -151,8 +150,8 @@ message Product { // Required. Product title. // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. // // Google Merchant Center property // [title](https://support.google.com/merchants/answer/6324415). Schema.org @@ -161,8 +160,8 @@ message Product { // Product description. // - // This field must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [description](https://support.google.com/merchants/answer/6324468). @@ -206,8 +205,8 @@ message Product { // // At most 250 values are allowed per // [Product][google.cloud.retail.v2alpha.Product]. This value must be a UTF-8 - // encoded string with a length limit of 1 KiB. Otherwise, an INVALID_ARGUMENT - // error is returned. + // encoded string with a length limit of 1,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. // // This tag can be used for filtering recommendation results by passing the // tag as part of the @@ -244,8 +243,8 @@ message Product { // Canonical URL directly linking to the product detail page. // - // This field must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [link](https://support.google.com/merchants/answer/6324416). @@ -262,8 +261,8 @@ message Product { // The material of the product. For example, "leather", "wooden". // // A maximum of 5 values are allowed. Each value must be a UTF-8 encoded - // string with a length limit of 128 bytes. Otherwise, an INVALID_ARGUMENT - // error is returned. + // string with a length limit of 128 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [material](https://support.google.com/merchants/answer/6324410). Schema.org diff --git a/google/cloud/retail/v2alpha/product_service.proto b/google/cloud/retail/v2alpha/product_service.proto index 5cda045f..9e8e4f41 100644 --- a/google/cloud/retail/v2alpha/product_service.proto +++ b/google/cloud/retail/v2alpha/product_service.proto @@ -85,8 +85,7 @@ service ProductService { // Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, // this operation could take hours to complete. To get a sample of // [Product][google.cloud.retail.v2alpha.Product]s that would be deleted, set - // [PurgeProductsRequest.force][google.cloud.retail.v2alpha.PurgeProductsRequest.force] - // to false. + // [PurgeProductsRequest.force][] to false. rpc PurgeProducts(PurgeProductsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -158,8 +157,8 @@ message CreateProductRequest { // [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 bytes. - // Otherwise, an INVALID_ARGUMENT 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. string product_id = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/retail/v2alpha/purge_config.proto b/google/cloud/retail/v2alpha/purge_config.proto index 02e11c95..34103b9d 100644 --- a/google/cloud/retail/v2alpha/purge_config.proto +++ b/google/cloud/retail/v2alpha/purge_config.proto @@ -18,9 +18,6 @@ package google.cloud.retail.v2alpha; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; -import "google/cloud/retail/v2alpha/product.proto"; -import "google/cloud/retail/v2alpha/user_event.proto"; -import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2alpha;retail"; @@ -33,13 +30,7 @@ option ruby_package = "Google::Cloud::Retail::V2alpha"; // Metadata related to the progress of the Purge operation. // This will be returned by the google.longrunning.Operation.metadata field. -message PurgeMetadata { - // The ID of the request / operation. - string operation = 1; - - // Operation create time. - google.protobuf.Timestamp create_time = 2; -} +message PurgeMetadata {} // Request message for PurgeProducts method. message PurgeProductsRequest { @@ -51,11 +42,6 @@ message PurgeProductsRequest { // Required. Filter matching the products to be purged. Only supported value // at the moment is "*" (all items). string filter = 2 [(google.api.field_behavior) = REQUIRED]; - - // The default value is false. Override this flag to true to - // actually perform the purge. If the field is not set to true, a sampling of - // products to be deleted will be returned. - bool force = 3; } // Response of the PurgeProductsRequest. If the long running operation is @@ -64,23 +50,18 @@ message PurgeProductsRequest { message PurgeProductsResponse { // The total count of products purged as a result of the operation. int64 purged_count = 1; - // A random sampling of products deleted (or will be deleted) depending - // on the `force` property in the request. Max of 500 items will be returned. - // Currently, this is only populated if force=false. - repeated Product products_sample = 2; } // Request message for PurgeUserEvents method. message PurgeUserEventsRequest { - // Required. The resource name of the event_store under which the events are + // Required. The resource name of the catalog under which the events are // created. The format is - // - // "projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}" + // "projects/${projectId}/locations/global/catalogs/${catalogId}" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The filter string to specify the events to be deleted. Empty - // string filter is not allowed. The eligible fields - // for filtering are: + // Required. The filter string to specify the events to be deleted with a + // length limit of 5,000 characters. Empty string filter is not allowed. The + // eligible fields for filtering are: // // * `eventType`: UserEvent.eventType field of type string. // * `eventTime`: in ISO 8601 "zulu" format. @@ -101,11 +82,6 @@ message PurgeUserEventsRequest { // // The filtering fields are assumed to have an implicit AND. string filter = 2 [(google.api.field_behavior) = REQUIRED]; - - // The default value is false. Override this flag to true to - // actually perform the purge. If the field is not set to true, a sampling of - // events to be deleted will be returned. - bool force = 3; } // Response of the PurgeUserEventsRequest. If the long running operation is @@ -114,8 +90,4 @@ message PurgeUserEventsRequest { message PurgeUserEventsResponse { // The total count of events purged as a result of the operation. int64 purged_events_count = 1; - - // A sampling of events deleted (or will be deleted) depending on the `force` - // property in the request. Max of 500 items will be returned. - repeated UserEvent user_events_sample = 2; } diff --git a/google/cloud/retail/v2alpha/user_event.proto b/google/cloud/retail/v2alpha/user_event.proto index 6e4df4ed..34305e4f 100644 --- a/google/cloud/retail/v2alpha/user_event.proto +++ b/google/cloud/retail/v2alpha/user_event.proto @@ -52,8 +52,8 @@ message UserEvent { // identify a visitor on a single device. This unique identifier should not // change if the visitor log in/out of the website. // - // The field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. string visitor_id = 2 [(google.api.field_behavior) = REQUIRED]; // Only required for @@ -125,8 +125,8 @@ message UserEvent { // The user's search query. // - // The value must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The value must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Required for `search` events. Other event types should not set this field. // Otherwise, an INVALID_ARGUMENT error is returned. @@ -151,7 +151,8 @@ message UserEvent { // Complete url (window.location.href) of the user's current page. // When using the client side event reporting with JavaScript pixel and Google - // Tag Manager, this value is filled in automatically. Maximum length 5KB. + // Tag Manager, this value is filled in automatically. Maximum length 5,000 + // characters. string uri = 13; // The referrer url of the current page. When using @@ -187,7 +188,8 @@ message UserEvent { // Detailed product information associated with a user event. message ProductDetail { // Required. [Product][google.cloud.retail.v2alpha.Product] information. - // Only [Product][id] field must to be set. + // Only [Product][id] field is used when ingesting an event, all other product + // fields are ignored as we will look them up from the catalog. Product product = 1 [(google.api.field_behavior) = REQUIRED]; // Quantity of the product associated with the user event. For @@ -199,7 +201,7 @@ message ProductDetail { // A transaction represents the entire purchase transaction. message PurchaseTransaction { - // The transaction ID with a length limit of 128 bytes. + // The transaction ID with a length limit of 128 characters. string id = 1; // Required. Total revenue or grand total associated with the transaction. diff --git a/google/cloud/retail/v2alpha/user_event_service.proto b/google/cloud/retail/v2alpha/user_event_service.proto index 69cf66ca..543f6f19 100644 --- a/google/cloud/retail/v2alpha/user_event_service.proto +++ b/google/cloud/retail/v2alpha/user_event_service.proto @@ -133,7 +133,7 @@ service UserEventService { // Request message for WriteUserEvent method. message WriteUserEventRequest { - // Required. The parent eventStore resource name, such as + // Required. The parent catalog resource name, such as // "projects/1234/locations/global/catalogs/default_catalog". string parent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -143,17 +143,18 @@ message WriteUserEventRequest { // Request message for CollectUserEvent method. message CollectUserEventRequest { - // Required. The parent eventStore name, such as + // Required. The parent catalog name, such as // "projects/1234/locations/global/catalogs/default_catalog". string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. URL encoded UserEvent proto. + // Required. URL encoded UserEvent proto with a length limit of 2,000,000 + // characters. string user_event = 2 [(google.api.field_behavior) = REQUIRED]; - // The url including cgi-parameters but excluding the hash fragment. The URL - // must be truncated to 1.5K bytes to conservatively be under the 2K bytes. - // This is often more useful than the referer url, because many browsers only - // send the domain for 3rd party requests. + // The url including cgi-parameters but excluding the hash fragment with a + // length limit of 5,000 characters. This is often more useful than the + // referer url, because many browsers only send the domain for 3rd party + // requests. string uri = 3; // The event timestamp in milliseconds. This prevents browser caching of diff --git a/google/cloud/retail/v2beta/catalog.proto b/google/cloud/retail/v2beta/catalog.proto index 7793c383..1b83738a 100644 --- a/google/cloud/retail/v2beta/catalog.proto +++ b/google/cloud/retail/v2beta/catalog.proto @@ -89,8 +89,8 @@ message Catalog { // Required. Immutable. The catalog display name. // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. string display_name = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE diff --git a/google/cloud/retail/v2beta/common.proto b/google/cloud/retail/v2beta/common.proto index 399168f2..277644ea 100644 --- a/google/cloud/retail/v2beta/common.proto +++ b/google/cloud/retail/v2beta/common.proto @@ -36,12 +36,12 @@ message CustomAttribute { // "green"]` when the key is "color". // // At most 400 values are allowed. Empty values are not allowed. Each value - // must be a UTF-8 encoded string with a length limit of 256 bytes. Otherwise, - // an INVALID_ARGUMENT error is returned. + // must be a UTF-8 encoded string with a length limit of 256 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. // // Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or // [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be - // set. Otherwise, a FAILED_PRECONDITION error is returned. + // set. Otherwise, a INVALID_ARGUMENT error is returned. repeated string text = 1; // The numerical values of this custom attribute. For example, `[2.3, 15.4]` @@ -52,7 +52,7 @@ message CustomAttribute { // // Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or // [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be - // set. Otherwise, a FAILED_PRECONDITION error is returned. + // set. Otherwise, a INVALID_ARGUMENT error is returned. repeated double numbers = 2; } @@ -60,8 +60,8 @@ message CustomAttribute { message Image { // Required. URI of the image. // - // This field must be a valid UTF-8 encoded URI with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a valid UTF-8 encoded URI with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [image_link](https://support.google.com/merchants/answer/6324350). @@ -118,8 +118,8 @@ message UserInfo { // Highly recommended for logged-in users. Unique identifier for logged-in // user, such as a user name. // - // The field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. string user_id = 1; // The end user's IP address. This field is used to extract location @@ -138,8 +138,8 @@ message UserInfo { // User agent as included in the HTTP header. // - // The field must be a UTF-8 encoded string with a length limit of 1 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // This should not be set when using the client side event reporting with // GTM or JavaScript tag in diff --git a/google/cloud/retail/v2beta/export_config.proto b/google/cloud/retail/v2beta/export_config.proto index b53c3f06..47f2aa27 100644 --- a/google/cloud/retail/v2beta/export_config.proto +++ b/google/cloud/retail/v2beta/export_config.proto @@ -79,14 +79,8 @@ message ExportProductsRequest { // "projects/1234/locations/global/catalogs/default_catalog/branches/default_branch" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency for expensive long running operations. - // Server-generated if unspecified. Up to 128 characters long. This is - // returned as google.longrunning.Operation.name in the response. - string request_id = 2; - // Required. The desired output location of the data. - OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; // Filtering expression to specify restrictions over // returned products. This is a sequence of terms, where each term applies @@ -120,7 +114,7 @@ message ExportProductsRequest { // expression is enclosed in parentheses, and must be separated from the // tag values by a space. `-"tagA"` is also supported and is equivalent // to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded - // strings with a size limit of 1 KiB. + // strings with a size limit of 1,000 characters. // // Some examples of valid filters expressions: // @@ -134,7 +128,7 @@ message ExportProductsRequest { // "2018-04-23T18:30:43.511Z" // * Example 4: lastModifiedTime > "2012-04-23T18:25:43.511Z" // * Example 5: availability = (IN_STOCK OR BACKORDER) - string filter = 4; + string filter = 3; } // Request message for ExportUserEvents method. @@ -142,14 +136,8 @@ message ExportUserEventsRequest { // Required. "projects/1234/locations/global/catalogs/default_catalog" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency for expensive long running operations. - // Server-generated if unspecified. Up to 128 characters long. This is - // returned as google.longrunning.Operation.name in the response. - string request_id = 2; - // Required. The desired output location of the data. - OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; // Filtering expression to specify restrictions over // returned events. This is a sequence of terms, where each term applies some @@ -185,25 +173,18 @@ message ExportUserEventsRequest { // * Example 4: eventTime > "2012-04-23T18:25:43.511Z" // * Example 5: eventType = (search OR impression) // * Example 6: eventsMissingCatalogItems - string filter = 4; + string filter = 3; } // Metadata related to the progress of the Export operation. This will be // returned by the google.longrunning.Operation.metadata field. message ExportMetadata { - // Name of the operation. - string name = 1; - - // Id of the request / operation. This is parroting back the requestId that - // was passed in the request. - string request_id = 2; - // Operation create time. - google.protobuf.Timestamp create_time = 3; + google.protobuf.Timestamp create_time = 1; // Operation last update time. If the operation is done, this is also the // finish time. - google.protobuf.Timestamp update_time = 4; + google.protobuf.Timestamp update_time = 2; } // Response of the ExportProductsRequest. If the long running diff --git a/google/cloud/retail/v2beta/import_config.proto b/google/cloud/retail/v2beta/import_config.proto index 69dbc18a..d91f663c 100644 --- a/google/cloud/retail/v2beta/import_config.proto +++ b/google/cloud/retail/v2beta/import_config.proto @@ -70,19 +70,22 @@ message GcsSource { // BigQuery source import data from. message BigQuerySource { - // The project id (can be project # or id) that the BigQuery source is in. If - // not specified, inherits the project id from the parent request. + // The project id (can be project # or id) that the BigQuery source is in with + // a length limit of 128 characters. If not specified, inherits the project + // id from the parent request. string project_id = 5; - // Required. The BigQuery data set to copy the data from. + // Required. The BigQuery data set to copy the data from with a length limit + // of 1,024 characters. string dataset_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The BigQuery table to copy the data from. + // Required. The BigQuery table to copy the data from with a length limit of + // 1,024 characters. string table_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Intermediate Cloud Storage directory used for the import. Can be specified - // if one wants to have the BigQuery export to a specific Cloud Storage - // directory. + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // BigQuery export to a specific Cloud Storage directory. string gcs_staging_dir = 3; // The schema to use when parsing the data from the source. @@ -109,14 +112,15 @@ message BigQuerySource { // The inline source for the input config for ImportProducts method. message ProductInlineSource { - // A list of products to update/create. Recommended max of 10k items. - repeated Product products = 1; + // Required. A list of products to update/create. Recommended max of 10k + // items. + repeated Product products = 1 [(google.api.field_behavior) = REQUIRED]; } // The inline source for the input config for ImportUserEvents method. message UserEventInlineSource { - // A list of user events to import. Recommended max of 10k items. - repeated UserEvent user_events = 1; + // Required. A list of user events to import. Recommended max of 10k items. + repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED]; } // Configuration of destination for Import related errors. @@ -160,7 +164,8 @@ message ImportUserEventsRequest { UserEventInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; - // The desired location of errors incurred during the Import. + // The desired location of errors incurred during the Import. Cannot be set + // for inline user event imports. ImportErrorsConfig errors_config = 3; } @@ -204,21 +209,18 @@ message ImportMetadata { pattern: "operations/{operation}" }; - // Name of the operation. - string name = 1; - // Operation create time. - google.protobuf.Timestamp create_time = 2; + google.protobuf.Timestamp create_time = 1; // Operation last update time. If the operation is done, this is also the // finish time. - google.protobuf.Timestamp update_time = 3; + google.protobuf.Timestamp update_time = 2; // Count of entries that were processed successfully. - int64 success_count = 4; + int64 success_count = 3; // Count of entries that encountered errors while processing. - int64 failure_count = 5; + int64 failure_count = 4; } // Response of the diff --git a/google/cloud/retail/v2beta/prediction_service.proto b/google/cloud/retail/v2beta/prediction_service.proto index 3ef2cd1f..7ab1b946 100644 --- a/google/cloud/retail/v2beta/prediction_service.proto +++ b/google/cloud/retail/v2beta/prediction_service.proto @@ -97,15 +97,15 @@ message PredictRequest { // The previous PredictResponse.next_page_token. string page_token = 4; - // Filter for restricting prediction results. Accepts values for - // tags and the `filterOutOfStockItems` flag. + // Filter for restricting prediction results with a length limit of 5,000 + // characters. Accepts values for tags and the `filterOutOfStockItems` flag. // // * Tag expressions. Restricts predictions to products that match all of the // specified tags. Boolean operators `OR` and `NOT` are supported if the // expression is enclosed in parentheses, and must be separated from the // tag values by a space. `-"tagA"` is also supported and is equivalent to // `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings - // with a size limit of 1 KiB. + // with a size limit of 1,000 characters. // // * filterOutOfStockItems. Restricts predictions to products that do not // have a diff --git a/google/cloud/retail/v2beta/product.proto b/google/cloud/retail/v2beta/product.proto index a60ddd15..fa634308 100644 --- a/google/cloud/retail/v2beta/product.proto +++ b/google/cloud/retail/v2beta/product.proto @@ -20,7 +20,6 @@ import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2beta/common.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -81,8 +80,8 @@ message Product { // // "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1". // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. // // Google Merchant Center property // [id](https://support.google.com/merchants/answer/6324405). @@ -98,7 +97,7 @@ message Product { // error is returned. // // Should only be set for [Type.VARIANT][] - // [Product][google.cloud.retail.v2beta.Product]s. A maximum of 1000 products + // [Product][google.cloud.retail.v2beta.Product]s. A maximum of 2000 products // are allowed to share the same [Type.PRIMARY][] // [Product][google.cloud.retail.v2beta.Product]. Otherwise, an // INVALID_ARGUMENT error is returned. @@ -137,8 +136,8 @@ message Product { // // At most 250 values are allowed per // [Product][google.cloud.retail.v2beta.Product]. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length limit of 5 - // KiB. Otherwise, an INVALID_ARGUMENT error is returned. + // allowed. Each value must be a UTF-8 encoded string with a length limit of + // 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // @@ -149,8 +148,8 @@ message Product { // Required. Product title. // - // This field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT 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. // // Google Merchant Center property // [title](https://support.google.com/merchants/answer/6324415). Schema.org @@ -159,8 +158,8 @@ message Product { // Product description. // - // This field must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [description](https://support.google.com/merchants/answer/6324468). @@ -204,8 +203,8 @@ message Product { // // At most 250 values are allowed per // [Product][google.cloud.retail.v2beta.Product]. This value must be a UTF-8 - // encoded string with a length limit of 1 KiB. Otherwise, an INVALID_ARGUMENT - // error is returned. + // encoded string with a length limit of 1,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. // // This tag can be used for filtering recommendation results by passing the // tag as part of the @@ -240,8 +239,8 @@ message Product { // Canonical URL directly linking to the product detail page. // - // This field must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // This field must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Google Merchant Center property // [link](https://support.google.com/merchants/answer/6324416). diff --git a/google/cloud/retail/v2beta/product_service.proto b/google/cloud/retail/v2beta/product_service.proto index 478aec99..67797b7d 100644 --- a/google/cloud/retail/v2beta/product_service.proto +++ b/google/cloud/retail/v2beta/product_service.proto @@ -85,8 +85,7 @@ service ProductService { // Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, // this operation could take hours to complete. To get a sample of // [Product][google.cloud.retail.v2beta.Product]s that would be deleted, set - // [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force] - // to false. + // [PurgeProductsRequest.force][] to false. rpc PurgeProducts(PurgeProductsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -158,8 +157,8 @@ message CreateProductRequest { // [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 bytes. - // Otherwise, an INVALID_ARGUMENT 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. string product_id = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/retail/v2beta/purge_config.proto b/google/cloud/retail/v2beta/purge_config.proto index 65afcc47..e5e99854 100644 --- a/google/cloud/retail/v2beta/purge_config.proto +++ b/google/cloud/retail/v2beta/purge_config.proto @@ -18,9 +18,6 @@ package google.cloud.retail.v2beta; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; -import "google/cloud/retail/v2beta/product.proto"; -import "google/cloud/retail/v2beta/user_event.proto"; -import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2beta"; option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2beta;retail"; @@ -33,13 +30,7 @@ option ruby_package = "Google::Cloud::Retail::V2beta"; // Metadata related to the progress of the Purge operation. // This will be returned by the google.longrunning.Operation.metadata field. -message PurgeMetadata { - // The ID of the request / operation. - string operation = 1; - - // Operation create time. - google.protobuf.Timestamp create_time = 2; -} +message PurgeMetadata {} // Request message for PurgeProducts method. message PurgeProductsRequest { @@ -51,11 +42,6 @@ message PurgeProductsRequest { // Required. Filter matching the products to be purged. Only supported value // at the moment is "*" (all items). string filter = 2 [(google.api.field_behavior) = REQUIRED]; - - // The default value is false. Override this flag to true to - // actually perform the purge. If the field is not set to true, a sampling of - // products to be deleted will be returned. - bool force = 3; } // Response of the PurgeProductsRequest. If the long running operation is @@ -64,23 +50,18 @@ message PurgeProductsRequest { message PurgeProductsResponse { // The total count of products purged as a result of the operation. int64 purged_count = 1; - // A random sampling of products deleted (or will be deleted) depending - // on the `force` property in the request. Max of 500 items will be returned. - // Currently, this is only populated if force=false. - repeated Product products_sample = 2; } // Request message for PurgeUserEvents method. message PurgeUserEventsRequest { - // Required. The resource name of the event_store under which the events are + // Required. The resource name of the catalog under which the events are // created. The format is - // - // "projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}" + // "projects/${projectId}/locations/global/catalogs/${catalogId}" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The filter string to specify the events to be deleted. Empty - // string filter is not allowed. The eligible fields - // for filtering are: + // Required. The filter string to specify the events to be deleted with a + // length limit of 5,000 characters. Empty string filter is not allowed. The + // eligible fields for filtering are: // // * `eventType`: UserEvent.eventType field of type string. // * `eventTime`: in ISO 8601 "zulu" format. @@ -101,11 +82,6 @@ message PurgeUserEventsRequest { // // The filtering fields are assumed to have an implicit AND. string filter = 2 [(google.api.field_behavior) = REQUIRED]; - - // The default value is false. Override this flag to true to - // actually perform the purge. If the field is not set to true, a sampling of - // events to be deleted will be returned. - bool force = 3; } // Response of the PurgeUserEventsRequest. If the long running operation is @@ -114,8 +90,4 @@ message PurgeUserEventsRequest { message PurgeUserEventsResponse { // The total count of events purged as a result of the operation. int64 purged_events_count = 1; - - // A sampling of events deleted (or will be deleted) depending on the `force` - // property in the request. Max of 500 items will be returned. - repeated UserEvent user_events_sample = 2; } diff --git a/google/cloud/retail/v2beta/user_event.proto b/google/cloud/retail/v2beta/user_event.proto index 68c83139..df6148b2 100644 --- a/google/cloud/retail/v2beta/user_event.proto +++ b/google/cloud/retail/v2beta/user_event.proto @@ -52,8 +52,8 @@ message UserEvent { // identify a visitor on a single device. This unique identifier should not // change if the visitor log in/out of the website. // - // The field must be a UTF-8 encoded string with a length limit of 128 bytes. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. string visitor_id = 2 [(google.api.field_behavior) = REQUIRED]; // Only required for @@ -125,8 +125,8 @@ message UserEvent { // The user's search query. // - // The value must be a UTF-8 encoded string with a length limit of 5 KiB. - // Otherwise, an INVALID_ARGUMENT error is returned. + // The value must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Required for `search` events. Other event types should not set this field. // Otherwise, an INVALID_ARGUMENT error is returned. @@ -151,7 +151,8 @@ message UserEvent { // Complete url (window.location.href) of the user's current page. // When using the client side event reporting with JavaScript pixel and Google - // Tag Manager, this value is filled in automatically. Maximum length 5KB. + // Tag Manager, this value is filled in automatically. Maximum length 5,000 + // characters. string uri = 13; // The referrer url of the current page. When using @@ -187,7 +188,8 @@ message UserEvent { // Detailed product information associated with a user event. message ProductDetail { // Required. [Product][google.cloud.retail.v2beta.Product] information. - // Only [Product][id] field must to be set. + // Only [Product][id] field is used when ingesting an event, all other product + // fields are ignored as we will look them up from the catalog. Product product = 1 [(google.api.field_behavior) = REQUIRED]; // Quantity of the product associated with the user event. For @@ -199,7 +201,7 @@ message ProductDetail { // A transaction represents the entire purchase transaction. message PurchaseTransaction { - // The transaction ID with a length limit of 128 bytes. + // The transaction ID with a length limit of 128 characters. string id = 1; // Required. Total revenue or grand total associated with the transaction. diff --git a/google/cloud/retail/v2beta/user_event_service.proto b/google/cloud/retail/v2beta/user_event_service.proto index b07fa003..06768bd1 100644 --- a/google/cloud/retail/v2beta/user_event_service.proto +++ b/google/cloud/retail/v2beta/user_event_service.proto @@ -133,7 +133,7 @@ service UserEventService { // Request message for WriteUserEvent method. message WriteUserEventRequest { - // Required. The parent eventStore resource name, such as + // Required. The parent catalog resource name, such as // "projects/1234/locations/global/catalogs/default_catalog". string parent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -143,17 +143,18 @@ message WriteUserEventRequest { // Request message for CollectUserEvent method. message CollectUserEventRequest { - // Required. The parent eventStore name, such as + // Required. The parent catalog name, such as // "projects/1234/locations/global/catalogs/default_catalog". string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. URL encoded UserEvent proto. + // Required. URL encoded UserEvent proto with a length limit of 2,000,000 + // characters. string user_event = 2 [(google.api.field_behavior) = REQUIRED]; - // The url including cgi-parameters but excluding the hash fragment. The URL - // must be truncated to 1.5K bytes to conservatively be under the 2K bytes. - // This is often more useful than the referer url, because many browsers only - // send the domain for 3rd party requests. + // The url including cgi-parameters but excluding the hash fragment with a + // length limit of 5,000 characters. This is often more useful than the + // referer url, because many browsers only send the domain for 3rd party + // requests. string uri = 3; // The event timestamp in milliseconds. This prevents browser caching of