// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package google.cloud.retail.v2alpha; 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/cloud/retail/v2alpha/import_config.proto"; option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2alpha;retail"; option java_multiple_files = true; option java_outer_classname = "CatalogProto"; option java_package = "com.google.cloud.retail.v2alpha"; option objc_class_prefix = "RETAIL"; option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; option ruby_package = "Google::Cloud::Retail::V2alpha"; // Configures what level the product should be uploaded with regards to // how users will be send events and how predictions will be made. message ProductLevelConfig { // The type of [Product][google.cloud.retail.v2alpha.Product]s allowed to be // ingested into the catalog. Acceptable values are: // // * `primary` (default): You can only ingest // [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] // [Product][google.cloud.retail.v2alpha.Product]s. This means // [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] // can only be empty or set to the same value as // [Product.id][google.cloud.retail.v2alpha.Product.id]. // * `variant`: You can only ingest // [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] // [Product][google.cloud.retail.v2alpha.Product]s. // This means // [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] // cannot be empty. // // If this field is set to an invalid value other than these, an // INVALID_ARGUMENT error is returned. // // If this field is `variant` and // [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] // is `itemGroupId`, an INVALID_ARGUMENT error is returned. // // See [Using product // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) // for more details. string ingestion_product_type = 1; // Which field of [Merchant Center // Product](/bigquery-transfer/docs/merchant-center-products-schema) should be // imported as [Product.id][google.cloud.retail.v2alpha.Product.id]. // Acceptable values are: // // * `offerId` (default): Import `offerId` as the product ID. // * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail // API will choose one item from the ones with the same `itemGroupId`, and // use it to represent the item group. // // If this field is set to an invalid value other than these, an // INVALID_ARGUMENT error is returned. // // If this field is `itemGroupId` and // [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] // is `variant`, an INVALID_ARGUMENT error is returned. // // See [Using product // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) // for more details. string merchant_center_product_id_field = 2; } // Represents a link between a Merchant Center account and a branch. // Once a link is established, products from the linked merchant center account // will be streamed to the linked branch. message MerchantCenterLink { // Required. The linked [Merchant center account // id](https://developers.google.com/shopping-content/guides/accountstatuses). // The account must be a standalone account or a sub-account of a MCA. int64 merchant_center_account_id = 1 [(google.api.field_behavior) = REQUIRED]; // The branch id (e.g. 0/1/2) within this catalog that products from // merchant_center_account_id are streamed to. When updating this field, an // empty value will use the currently configured default branch. However, // changing the default branch later on won't change the linked branch here. // // A single branch id can only have one linked merchant center account id. string branch_id = 2; // String representing the destination to import for, all if left empty. // List of possible values can be found here. // [https://support.google.com/merchants/answer/7501026] // List of allowed string values: // "shopping-ads", "buy-on-google-listings", "display-ads", "local-inventory // -ads", "free-listings", "free-local-listings" // NOTE: The string values are case sensitive. repeated string destinations = 3; } // Configures Merchant Center linking. // Links contained in the config will be used to sync data from a Merchant // Center account to a Cloud Retail branch. message MerchantCenterLinkingConfig { // Links between Merchant Center accounts and branches. repeated MerchantCenterLink links = 1; } // The catalog configuration. message Catalog { option (google.api.resource) = { type: "retail.googleapis.com/Catalog" pattern: "projects/{project}/locations/{location}/catalogs/{catalog}" }; // Required. Immutable. The fully qualified resource name of the catalog. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; // Required. Immutable. The catalog display name. // // 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 ]; // Required. The product level configuration. ProductLevelConfig product_level_config = 4 [(google.api.field_behavior) = REQUIRED]; // The Merchant Center linking configuration. // Once a link is added, the data stream from Merchant Center to Cloud Retail // will be enabled automatically. The requester must have access to the // merchant center account in order to make changes to this field. MerchantCenterLinkingConfig merchant_center_linking_config = 6; }