Class Model.PageOptimizationConfig.Builder

  • All Implemented Interfaces:
    Model.PageOptimizationConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Model.PageOptimizationConfig

    public static final class Model.PageOptimizationConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Model.PageOptimizationConfig.Builder>
    implements Model.PageOptimizationConfigOrBuilder
     The PageOptimizationConfig for model training.
    
     This determines how many panels to optimize for, and which serving
     configs to consider for each panel.
     The purpose of this model is to optimize which
     [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] to show on which
     panels in way that optimizes the visitors shopping journey.
     
    Protobuf type google.cloud.retail.v2alpha.Model.PageOptimizationConfig
    • 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<Model.PageOptimizationConfig.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<Model.PageOptimizationConfig.Builder>
      • getDefaultInstanceForType

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

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

        public Model.PageOptimizationConfig buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public Model.PageOptimizationConfig.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<Model.PageOptimizationConfig.Builder>
        Throws:
        IOException
      • getPageOptimizationEventType

        public String getPageOptimizationEventType()
         Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
         this page optimization is shown for.
        
         Each page has an associated event type - this will be the
         corresponding event type for the page that the page optimization
         model is used on.
        
         Supported types:
        
         * `add-to-cart`: Products being added to cart.
         * `detail-page-view`: Products detail page viewed.
         * `home-page-view`: Homepage viewed
         * `category-page-view`: Homepage viewed
         * `shopping-cart-page-view`: User viewing a shopping cart.
        
         `home-page-view` only allows models with type `recommended-for-you`.
         All other page_optimization_event_type allow all
         [Model.types][google.cloud.retail.v2alpha.Model.type].
         
        string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPageOptimizationEventType in interface Model.PageOptimizationConfigOrBuilder
        Returns:
        The pageOptimizationEventType.
      • getPageOptimizationEventTypeBytes

        public com.google.protobuf.ByteString getPageOptimizationEventTypeBytes()
         Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
         this page optimization is shown for.
        
         Each page has an associated event type - this will be the
         corresponding event type for the page that the page optimization
         model is used on.
        
         Supported types:
        
         * `add-to-cart`: Products being added to cart.
         * `detail-page-view`: Products detail page viewed.
         * `home-page-view`: Homepage viewed
         * `category-page-view`: Homepage viewed
         * `shopping-cart-page-view`: User viewing a shopping cart.
        
         `home-page-view` only allows models with type `recommended-for-you`.
         All other page_optimization_event_type allow all
         [Model.types][google.cloud.retail.v2alpha.Model.type].
         
        string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPageOptimizationEventTypeBytes in interface Model.PageOptimizationConfigOrBuilder
        Returns:
        The bytes for pageOptimizationEventType.
      • setPageOptimizationEventType

        public Model.PageOptimizationConfig.Builder setPageOptimizationEventType​(String value)
         Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
         this page optimization is shown for.
        
         Each page has an associated event type - this will be the
         corresponding event type for the page that the page optimization
         model is used on.
        
         Supported types:
        
         * `add-to-cart`: Products being added to cart.
         * `detail-page-view`: Products detail page viewed.
         * `home-page-view`: Homepage viewed
         * `category-page-view`: Homepage viewed
         * `shopping-cart-page-view`: User viewing a shopping cart.
        
         `home-page-view` only allows models with type `recommended-for-you`.
         All other page_optimization_event_type allow all
         [Model.types][google.cloud.retail.v2alpha.Model.type].
         
        string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The pageOptimizationEventType to set.
        Returns:
        This builder for chaining.
      • clearPageOptimizationEventType

        public Model.PageOptimizationConfig.Builder clearPageOptimizationEventType()
         Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
         this page optimization is shown for.
        
         Each page has an associated event type - this will be the
         corresponding event type for the page that the page optimization
         model is used on.
        
         Supported types:
        
         * `add-to-cart`: Products being added to cart.
         * `detail-page-view`: Products detail page viewed.
         * `home-page-view`: Homepage viewed
         * `category-page-view`: Homepage viewed
         * `shopping-cart-page-view`: User viewing a shopping cart.
        
         `home-page-view` only allows models with type `recommended-for-you`.
         All other page_optimization_event_type allow all
         [Model.types][google.cloud.retail.v2alpha.Model.type].
         
        string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setPageOptimizationEventTypeBytes

        public Model.PageOptimizationConfig.Builder setPageOptimizationEventTypeBytes​(com.google.protobuf.ByteString value)
         Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
         this page optimization is shown for.
        
         Each page has an associated event type - this will be the
         corresponding event type for the page that the page optimization
         model is used on.
        
         Supported types:
        
         * `add-to-cart`: Products being added to cart.
         * `detail-page-view`: Products detail page viewed.
         * `home-page-view`: Homepage viewed
         * `category-page-view`: Homepage viewed
         * `shopping-cart-page-view`: User viewing a shopping cart.
        
         `home-page-view` only allows models with type `recommended-for-you`.
         All other page_optimization_event_type allow all
         [Model.types][google.cloud.retail.v2alpha.Model.type].
         
        string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for pageOptimizationEventType to set.
        Returns:
        This builder for chaining.
      • getPanelsCount

        public int getPanelsCount()
         Required. A list of panel configurations.
        
         Limit = 5.
         
        repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPanelsCount in interface Model.PageOptimizationConfigOrBuilder
      • clearPanels

        public Model.PageOptimizationConfig.Builder clearPanels()
         Required. A list of panel configurations.
        
         Limit = 5.
         
        repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
      • removePanels

        public Model.PageOptimizationConfig.Builder removePanels​(int index)
         Required. A list of panel configurations.
        
         Limit = 5.
         
        repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
      • getPanelsBuilder

        public Model.PageOptimizationConfig.Panel.Builder getPanelsBuilder​(int index)
         Required. A list of panel configurations.
        
         Limit = 5.
         
        repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
      • addPanelsBuilder

        public Model.PageOptimizationConfig.Panel.Builder addPanelsBuilder()
         Required. A list of panel configurations.
        
         Limit = 5.
         
        repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
      • addPanelsBuilder

        public Model.PageOptimizationConfig.Panel.Builder addPanelsBuilder​(int index)
         Required. A list of panel configurations.
        
         Limit = 5.
         
        repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
      • getPanelsBuilderList

        public List<Model.PageOptimizationConfig.Panel.Builder> getPanelsBuilderList()
         Required. A list of panel configurations.
        
         Limit = 5.
         
        repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
      • getRestrictionValue

        public int getRestrictionValue()
         Optional. How to restrict results across panels e.g. can the same
         [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
         multiple panels at once.
        
         If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
         
        .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getRestrictionValue in interface Model.PageOptimizationConfigOrBuilder
        Returns:
        The enum numeric value on the wire for restriction.
      • setRestrictionValue

        public Model.PageOptimizationConfig.Builder setRestrictionValue​(int value)
         Optional. How to restrict results across panels e.g. can the same
         [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
         multiple panels at once.
        
         If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
         
        .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The enum numeric value on the wire for restriction to set.
        Returns:
        This builder for chaining.
      • getRestriction

        public Model.PageOptimizationConfig.Restriction getRestriction()
         Optional. How to restrict results across panels e.g. can the same
         [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
         multiple panels at once.
        
         If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
         
        .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getRestriction in interface Model.PageOptimizationConfigOrBuilder
        Returns:
        The restriction.
      • setRestriction

        public Model.PageOptimizationConfig.Builder setRestriction​(Model.PageOptimizationConfig.Restriction value)
         Optional. How to restrict results across panels e.g. can the same
         [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
         multiple panels at once.
        
         If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
         
        .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The restriction to set.
        Returns:
        This builder for chaining.
      • clearRestriction

        public Model.PageOptimizationConfig.Builder clearRestriction()
         Optional. How to restrict results across panels e.g. can the same
         [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
         multiple panels at once.
        
         If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
         
        .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.