Sync the public proto up-to-date with the recent changes

PiperOrigin-RevId: 335923930
This commit is contained in:
Google APIs 2020-10-07 12:14:19 -07:00 committed by Copybara-Service
parent 80eada6dbc
commit 9c00a2f0dc
30 changed files with 253 additions and 396 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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).

View File

@ -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];
}

View File

@ -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;
}

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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];
}

View File

@ -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;
}

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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).

View File

@ -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];
}

View File

@ -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;
}

View File

@ -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.

View File

@ -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