Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModelPageOptimizationConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb

Overview

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 to show on which panels in way that optimizes the visitors shopping journey.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaModelPageOptimizationConfig

Returns a new instance of GoogleCloudRetailV2alphaModelPageOptimizationConfig.



3591
3592
3593
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3591

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#page_optimization_event_typeString

Required. The type of 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. Corresponds to the JSON property pageOptimizationEventType

Returns:

  • (String)


3577
3578
3579
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3577

def page_optimization_event_type
  @page_optimization_event_type
end

#panelsArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel>

Required. A list of panel configurations. Limit = 5. Corresponds to the JSON property panels



3582
3583
3584
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3582

def panels
  @panels
end

#restrictionString

Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to UNIQUE_MODEL_RESTRICTION. Corresponds to the JSON property restriction

Returns:

  • (String)


3589
3590
3591
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3589

def restriction
  @restriction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3596
3597
3598
3599
3600
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3596

def update!(**args)
  @page_optimization_event_type = args[:page_optimization_event_type] if args.key?(:page_optimization_event_type)
  @panels = args[:panels] if args.key?(:panels)
  @restriction = args[:restriction] if args.key?(:restriction)
end