Class ProductLevelConfig.Builder

  • All Implemented Interfaces:
    ProductLevelConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ProductLevelConfig

    public static final class ProductLevelConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
    implements ProductLevelConfigOrBuilder
     Configures what level the product should be uploaded with regards to
     how users will be send events and how predictions will be made.
     
    Protobuf type google.cloud.retail.v2.ProductLevelConfig
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • clear

        public ProductLevelConfig.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • getDefaultInstanceForType

        public ProductLevelConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public ProductLevelConfig build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public ProductLevelConfig buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public ProductLevelConfig.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • setField

        public ProductLevelConfig.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • clearField

        public ProductLevelConfig.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • clearOneof

        public ProductLevelConfig.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • setRepeatedField

        public ProductLevelConfig.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           int index,
                                                           Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • addRepeatedField

        public ProductLevelConfig.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • mergeFrom

        public ProductLevelConfig.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ProductLevelConfig.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • mergeFrom

        public ProductLevelConfig.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ProductLevelConfig.Builder>
        Throws:
        IOException
      • getIngestionProductType

        public String getIngestionProductType()
         The type of [Product][google.cloud.retail.v2.Product]s allowed to be
         ingested into the catalog. Acceptable values are:
        
         * `primary` (default): You can ingest
         [Product][google.cloud.retail.v2.Product]s of all types. When
           ingesting a [Product][google.cloud.retail.v2.Product], its type will
           default to
           [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] if
           unset.
         * `variant` (incompatible with Retail Search): You can only
           ingest
           [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
           [Product][google.cloud.retail.v2.Product]s. This means
           [Product.primary_product_id][google.cloud.retail.v2.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.v2.ProductLevelConfig.merchant_center_product_id_field]
         is `itemGroupId`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string ingestion_product_type = 1;
        Specified by:
        getIngestionProductType in interface ProductLevelConfigOrBuilder
        Returns:
        The ingestionProductType.
      • getIngestionProductTypeBytes

        public com.google.protobuf.ByteString getIngestionProductTypeBytes()
         The type of [Product][google.cloud.retail.v2.Product]s allowed to be
         ingested into the catalog. Acceptable values are:
        
         * `primary` (default): You can ingest
         [Product][google.cloud.retail.v2.Product]s of all types. When
           ingesting a [Product][google.cloud.retail.v2.Product], its type will
           default to
           [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] if
           unset.
         * `variant` (incompatible with Retail Search): You can only
           ingest
           [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
           [Product][google.cloud.retail.v2.Product]s. This means
           [Product.primary_product_id][google.cloud.retail.v2.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.v2.ProductLevelConfig.merchant_center_product_id_field]
         is `itemGroupId`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string ingestion_product_type = 1;
        Specified by:
        getIngestionProductTypeBytes in interface ProductLevelConfigOrBuilder
        Returns:
        The bytes for ingestionProductType.
      • setIngestionProductType

        public ProductLevelConfig.Builder setIngestionProductType​(String value)
         The type of [Product][google.cloud.retail.v2.Product]s allowed to be
         ingested into the catalog. Acceptable values are:
        
         * `primary` (default): You can ingest
         [Product][google.cloud.retail.v2.Product]s of all types. When
           ingesting a [Product][google.cloud.retail.v2.Product], its type will
           default to
           [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] if
           unset.
         * `variant` (incompatible with Retail Search): You can only
           ingest
           [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
           [Product][google.cloud.retail.v2.Product]s. This means
           [Product.primary_product_id][google.cloud.retail.v2.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.v2.ProductLevelConfig.merchant_center_product_id_field]
         is `itemGroupId`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string ingestion_product_type = 1;
        Parameters:
        value - The ingestionProductType to set.
        Returns:
        This builder for chaining.
      • clearIngestionProductType

        public ProductLevelConfig.Builder clearIngestionProductType()
         The type of [Product][google.cloud.retail.v2.Product]s allowed to be
         ingested into the catalog. Acceptable values are:
        
         * `primary` (default): You can ingest
         [Product][google.cloud.retail.v2.Product]s of all types. When
           ingesting a [Product][google.cloud.retail.v2.Product], its type will
           default to
           [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] if
           unset.
         * `variant` (incompatible with Retail Search): You can only
           ingest
           [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
           [Product][google.cloud.retail.v2.Product]s. This means
           [Product.primary_product_id][google.cloud.retail.v2.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.v2.ProductLevelConfig.merchant_center_product_id_field]
         is `itemGroupId`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string ingestion_product_type = 1;
        Returns:
        This builder for chaining.
      • setIngestionProductTypeBytes

        public ProductLevelConfig.Builder setIngestionProductTypeBytes​(com.google.protobuf.ByteString value)
         The type of [Product][google.cloud.retail.v2.Product]s allowed to be
         ingested into the catalog. Acceptable values are:
        
         * `primary` (default): You can ingest
         [Product][google.cloud.retail.v2.Product]s of all types. When
           ingesting a [Product][google.cloud.retail.v2.Product], its type will
           default to
           [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] if
           unset.
         * `variant` (incompatible with Retail Search): You can only
           ingest
           [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
           [Product][google.cloud.retail.v2.Product]s. This means
           [Product.primary_product_id][google.cloud.retail.v2.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.v2.ProductLevelConfig.merchant_center_product_id_field]
         is `itemGroupId`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string ingestion_product_type = 1;
        Parameters:
        value - The bytes for ingestionProductType to set.
        Returns:
        This builder for chaining.
      • getMerchantCenterProductIdField

        public String getMerchantCenterProductIdField()
         Which field of [Merchant Center
         Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
         imported as [Product.id][google.cloud.retail.v2.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.v2.ProductLevelConfig.ingestion_product_type]
         is `variant`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string merchant_center_product_id_field = 2;
        Specified by:
        getMerchantCenterProductIdField in interface ProductLevelConfigOrBuilder
        Returns:
        The merchantCenterProductIdField.
      • getMerchantCenterProductIdFieldBytes

        public com.google.protobuf.ByteString getMerchantCenterProductIdFieldBytes()
         Which field of [Merchant Center
         Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
         imported as [Product.id][google.cloud.retail.v2.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.v2.ProductLevelConfig.ingestion_product_type]
         is `variant`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string merchant_center_product_id_field = 2;
        Specified by:
        getMerchantCenterProductIdFieldBytes in interface ProductLevelConfigOrBuilder
        Returns:
        The bytes for merchantCenterProductIdField.
      • setMerchantCenterProductIdField

        public ProductLevelConfig.Builder setMerchantCenterProductIdField​(String value)
         Which field of [Merchant Center
         Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
         imported as [Product.id][google.cloud.retail.v2.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.v2.ProductLevelConfig.ingestion_product_type]
         is `variant`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string merchant_center_product_id_field = 2;
        Parameters:
        value - The merchantCenterProductIdField to set.
        Returns:
        This builder for chaining.
      • clearMerchantCenterProductIdField

        public ProductLevelConfig.Builder clearMerchantCenterProductIdField()
         Which field of [Merchant Center
         Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
         imported as [Product.id][google.cloud.retail.v2.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.v2.ProductLevelConfig.ingestion_product_type]
         is `variant`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string merchant_center_product_id_field = 2;
        Returns:
        This builder for chaining.
      • setMerchantCenterProductIdFieldBytes

        public ProductLevelConfig.Builder setMerchantCenterProductIdFieldBytes​(com.google.protobuf.ByteString value)
         Which field of [Merchant Center
         Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
         imported as [Product.id][google.cloud.retail.v2.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.v2.ProductLevelConfig.ingestion_product_type]
         is `variant`, an INVALID_ARGUMENT error is returned.
        
         See [Product
         levels](https://cloud.google.com/retail/docs/catalog#product-levels)
         for more details.
         
        string merchant_center_product_id_field = 2;
        Parameters:
        value - The bytes for merchantCenterProductIdField to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final ProductLevelConfig.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>
      • mergeUnknownFields

        public final ProductLevelConfig.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ProductLevelConfig.Builder>