@@ -7030,6 +7030,21 @@ class GoogleCloudRetailV2betaRule
70307030 # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleOnewaySynonymsAction]
70317031 attr_accessor :oneway_synonyms_action
70327032
7033+ # Pins one or more specified products to a specific position in the results. *
7034+ # Rule Condition: Must specify non-empty Condition.query_terms (for search only)
7035+ # or Condition.page_categories (for browse only), but can't specify both. *
7036+ # Action Input: mapping of `[pin_position, product_id]` pairs (pin position uses
7037+ # 1-based indexing). * Action Result: Will pin products with matching ids to the
7038+ # position specified in the final result order. Example: Suppose the query is `
7039+ # shoes`, the Condition.query_terms is `shoes` and the pin_map has ``1, "pid1"``,
7040+ # then product with `pid1` will be pinned to the top position in the final
7041+ # results. If multiple PinActions are matched to a single request the actions
7042+ # will be processed from most to least recently updated. Pins to positions
7043+ # larger than the max allowed page size of 120 are not allowed.
7044+ # Corresponds to the JSON property `pinAction`
7045+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRulePinAction]
7046+ attr_accessor :pin_action
7047+
70337048 # Redirects a shopper to a specific page. * Rule Condition: Must specify
70347049 # Condition.query_terms. * Action Input: Request Query * Action Result:
70357050 # Redirects shopper to provided uri.
@@ -7075,6 +7090,7 @@ def update!(**args)
70757090 @force_return_facet_action = args [ :force_return_facet_action ] if args . key? ( :force_return_facet_action )
70767091 @ignore_action = args [ :ignore_action ] if args . key? ( :ignore_action )
70777092 @oneway_synonyms_action = args [ :oneway_synonyms_action ] if args . key? ( :oneway_synonyms_action )
7093+ @pin_action = args [ :pin_action ] if args . key? ( :pin_action )
70787094 @redirect_action = args [ :redirect_action ] if args . key? ( :redirect_action )
70797095 @remove_facet_action = args [ :remove_facet_action ] if args . key? ( :remove_facet_action )
70807096 @replacement_action = args [ :replacement_action ] if args . key? ( :replacement_action )
@@ -7300,6 +7316,43 @@ def update!(**args)
73007316 end
73017317 end
73027318
7319+ # Pins one or more specified products to a specific position in the results. *
7320+ # Rule Condition: Must specify non-empty Condition.query_terms (for search only)
7321+ # or Condition.page_categories (for browse only), but can't specify both. *
7322+ # Action Input: mapping of `[pin_position, product_id]` pairs (pin position uses
7323+ # 1-based indexing). * Action Result: Will pin products with matching ids to the
7324+ # position specified in the final result order. Example: Suppose the query is `
7325+ # shoes`, the Condition.query_terms is `shoes` and the pin_map has ``1, "pid1"``,
7326+ # then product with `pid1` will be pinned to the top position in the final
7327+ # results. If multiple PinActions are matched to a single request the actions
7328+ # will be processed from most to least recently updated. Pins to positions
7329+ # larger than the max allowed page size of 120 are not allowed.
7330+ class GoogleCloudRetailV2betaRulePinAction
7331+ include Google ::Apis ::Core ::Hashable
7332+
7333+ # Required. A map of positions to product_ids. Partial matches per action are
7334+ # allowed, if a certain position in the map is already filled that `[position,
7335+ # product_id]` pair will be ignored but the rest may still be applied. This case
7336+ # will only occur if multiple pin actions are matched to a single request, as
7337+ # the map guarantees that pin positions are unique within the same action.
7338+ # Duplicate product_ids are not permitted within a single pin map. The max size
7339+ # of this map is 120, equivalent to the max [request page size](https://cloud.
7340+ # google.com/retail/docs/reference/rest/v2/projects.locations.catalogs.
7341+ # placements/search#request-body).
7342+ # Corresponds to the JSON property `pinMap`
7343+ # @return [Hash<String,String>]
7344+ attr_accessor :pin_map
7345+
7346+ def initialize ( **args )
7347+ update! ( **args )
7348+ end
7349+
7350+ # Update properties of this object
7351+ def update! ( **args )
7352+ @pin_map = args [ :pin_map ] if args . key? ( :pin_map )
7353+ end
7354+ end
7355+
73037356 # Redirects a shopper to a specific page. * Rule Condition: Must specify
73047357 # Condition.query_terms. * Action Input: Request Query * Action Result:
73057358 # Redirects shopper to provided uri.
0 commit comments