Class Model.PageOptimizationConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Model.PageOptimizationConfig.Builder>
com.google.cloud.retail.v2alpha.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.GeneratedMessage.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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Model.PageOptimizationConfig.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.GeneratedMessage.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.GeneratedMessage.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

      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
    • mergeFrom

      public Model.PageOptimizationConfig.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<Model.PageOptimizationConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.
    • getPanelsList

      public List<Model.PageOptimizationConfig.Panel> getPanelsList()
       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:
      getPanelsList in interface Model.PageOptimizationConfigOrBuilder
    • 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
    • getPanels

      public Model.PageOptimizationConfig.Panel getPanels(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];
      Specified by:
      getPanels in interface Model.PageOptimizationConfigOrBuilder
    • setPanels

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

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

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

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

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

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

       Required. A list of panel configurations.
      
       Limit = 5.
       
      repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED];
    • 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];
    • getPanelsOrBuilder

      public Model.PageOptimizationConfig.PanelOrBuilder getPanelsOrBuilder(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];
      Specified by:
      getPanelsOrBuilder in interface Model.PageOptimizationConfigOrBuilder
    • getPanelsOrBuilderList

      public List<? extends Model.PageOptimizationConfig.PanelOrBuilder> getPanelsOrBuilderList()
       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:
      getPanelsOrBuilderList in interface Model.PageOptimizationConfigOrBuilder
    • 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

       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

       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.