# frozen_string_literal: true

# 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
#
#     https://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.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!


module Google
  module Cloud
    module Retail
      module V2alpha
        # Configures what level the product should be uploaded with regards to
        # how users will be send events and how predictions will be made.
        # @!attribute [rw] ingestion_product_type
        #   @return [::String]
        #     The type of {::Google::Cloud::Retail::V2alpha::Product Product}s allowed to be
        #     ingested into the catalog. Acceptable values are:
        #
        #     * `primary` (default): You can only ingest
        #     {::Google::Cloud::Retail::V2alpha::Product::Type::PRIMARY Product.Type.PRIMARY}
        #       {::Google::Cloud::Retail::V2alpha::Product Product}s. This means
        #       {::Google::Cloud::Retail::V2alpha::Product#primary_product_id Product.primary_product_id}
        #       can only be empty or set to the same value as
        #       {::Google::Cloud::Retail::V2alpha::Product#id Product.id}.
        #     * `variant`: You can only ingest
        #     {::Google::Cloud::Retail::V2alpha::Product::Type::VARIANT Product.Type.VARIANT}
        #     {::Google::Cloud::Retail::V2alpha::Product Product}s.
        #       This means
        #       {::Google::Cloud::Retail::V2alpha::Product#primary_product_id 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
        #     {::Google::Cloud::Retail::V2alpha::ProductLevelConfig#merchant_center_product_id_field 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.
        # @!attribute [rw] merchant_center_product_id_field
        #   @return [::String]
        #     Which field of [Merchant Center
        #     Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
        #     imported as {::Google::Cloud::Retail::V2alpha::Product#id 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
        #     {::Google::Cloud::Retail::V2alpha::ProductLevelConfig#ingestion_product_type 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.
        class ProductLevelConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # 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.
        # @!attribute [rw] merchant_center_account_id
        #   @return [::Integer]
        #     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.
        # @!attribute [rw] branch_id
        #   @return [::String]
        #     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.
        # @!attribute [rw] destinations
        #   @return [::Array<::String>]
        #     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.
        class MerchantCenterLink
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # 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.
        # @!attribute [rw] links
        #   @return [::Array<::Google::Cloud::Retail::V2alpha::MerchantCenterLink>]
        #     Links between Merchant Center accounts and branches.
        class MerchantCenterLinkingConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The catalog configuration.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. Immutable. The fully qualified resource name of the catalog.
        # @!attribute [rw] display_name
        #   @return [::String]
        #     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.
        # @!attribute [rw] product_level_config
        #   @return [::Google::Cloud::Retail::V2alpha::ProductLevelConfig]
        #     Required. The product level configuration.
        # @!attribute [rw] merchant_center_linking_config
        #   @return [::Google::Cloud::Retail::V2alpha::MerchantCenterLinkingConfig]
        #     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.
        class Catalog
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end
      end
    end
  end
end
