@@ -6461,6 +6461,21 @@ class GoogleCloudRetailV2alphaRule
64616461 # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleOnewaySynonymsAction]
64626462 attr_accessor :oneway_synonyms_action
64636463
6464+ # Pins one or more specified products to a specific position in the results. *
6465+ # Rule Condition: Must specify non-empty Condition.query_terms (for search only)
6466+ # or Condition.page_categories (for browse only), but can't specify both. *
6467+ # Action Input: mapping of `[pin_position, product_id]` pairs (pin position uses
6468+ # 1-based indexing). * Action Result: Will pin products with matching ids to the
6469+ # position specified in the final result order. Example: Suppose the query is `
6470+ # shoes`, the Condition.query_terms is `shoes` and the pin_map has ``1, "pid1"``,
6471+ # then product with `pid1` will be pinned to the top position in the final
6472+ # results. If multiple PinActions are matched to a single request the actions
6473+ # will be processed from most to least recently updated. Pins to positions
6474+ # larger than the max allowed page size of 120 are not allowed.
6475+ # Corresponds to the JSON property `pinAction`
6476+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRulePinAction]
6477+ attr_accessor :pin_action
6478+
64646479 # Redirects a shopper to a specific page. * Rule Condition: Must specify
64656480 # Condition.query_terms. * Action Input: Request Query * Action Result:
64666481 # Redirects shopper to provided uri.
@@ -6506,6 +6521,7 @@ def update!(**args)
65066521 @force_return_facet_action = args [ :force_return_facet_action ] if args . key? ( :force_return_facet_action )
65076522 @ignore_action = args [ :ignore_action ] if args . key? ( :ignore_action )
65086523 @oneway_synonyms_action = args [ :oneway_synonyms_action ] if args . key? ( :oneway_synonyms_action )
6524+ @pin_action = args [ :pin_action ] if args . key? ( :pin_action )
65096525 @redirect_action = args [ :redirect_action ] if args . key? ( :redirect_action )
65106526 @remove_facet_action = args [ :remove_facet_action ] if args . key? ( :remove_facet_action )
65116527 @replacement_action = args [ :replacement_action ] if args . key? ( :replacement_action )
@@ -6731,6 +6747,43 @@ def update!(**args)
67316747 end
67326748 end
67336749
6750+ # Pins one or more specified products to a specific position in the results. *
6751+ # Rule Condition: Must specify non-empty Condition.query_terms (for search only)
6752+ # or Condition.page_categories (for browse only), but can't specify both. *
6753+ # Action Input: mapping of `[pin_position, product_id]` pairs (pin position uses
6754+ # 1-based indexing). * Action Result: Will pin products with matching ids to the
6755+ # position specified in the final result order. Example: Suppose the query is `
6756+ # shoes`, the Condition.query_terms is `shoes` and the pin_map has ``1, "pid1"``,
6757+ # then product with `pid1` will be pinned to the top position in the final
6758+ # results. If multiple PinActions are matched to a single request the actions
6759+ # will be processed from most to least recently updated. Pins to positions
6760+ # larger than the max allowed page size of 120 are not allowed.
6761+ class GoogleCloudRetailV2alphaRulePinAction
6762+ include Google ::Apis ::Core ::Hashable
6763+
6764+ # Required. A map of positions to product_ids. Partial matches per action are
6765+ # allowed, if a certain position in the map is already filled that `[position,
6766+ # product_id]` pair will be ignored but the rest may still be applied. This case
6767+ # will only occur if multiple pin actions are matched to a single request, as
6768+ # the map guarantees that pin positions are unique within the same action.
6769+ # Duplicate product_ids are not permitted within a single pin map. The max size
6770+ # of this map is 120, equivalent to the max [request page size](https://cloud.
6771+ # google.com/retail/docs/reference/rest/v2/projects.locations.catalogs.
6772+ # placements/search#request-body).
6773+ # Corresponds to the JSON property `pinMap`
6774+ # @return [Hash<String,String>]
6775+ attr_accessor :pin_map
6776+
6777+ def initialize ( **args )
6778+ update! ( **args )
6779+ end
6780+
6781+ # Update properties of this object
6782+ def update! ( **args )
6783+ @pin_map = args [ :pin_map ] if args . key? ( :pin_map )
6784+ end
6785+ end
6786+
67346787 # Redirects a shopper to a specific page. * Rule Condition: Must specify
67356788 # Condition.query_terms. * Action Input: Request Query * Action Result:
67366789 # Redirects shopper to provided uri.
0 commit comments