From a16034377eb752f49097115210fa434a253b2ea1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 12 Jan 2025 10:34:30 +0000 Subject: [PATCH] feat: Automated regeneration of retail v2beta client --- api_names_out.yaml | 4 ++ .../google-apis-retail_v2beta/CHANGELOG.md | 5 ++ .../lib/google/apis/retail_v2beta/classes.rb | 53 +++++++++++++++++++ .../google/apis/retail_v2beta/gem_version.rb | 6 +-- .../apis/retail_v2beta/representations.rb | 15 ++++++ 5 files changed, 80 insertions(+), 3 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 296a152d92f..dd03a602762 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -299869,6 +299869,7 @@ "/retail:v2beta/GoogleCloudRetailV2betaRule/forceReturnFacetAction": force_return_facet_action "/retail:v2beta/GoogleCloudRetailV2betaRule/ignoreAction": ignore_action "/retail:v2beta/GoogleCloudRetailV2betaRule/onewaySynonymsAction": oneway_synonyms_action +"/retail:v2beta/GoogleCloudRetailV2betaRule/pinAction": pin_action "/retail:v2beta/GoogleCloudRetailV2betaRule/redirectAction": redirect_action "/retail:v2beta/GoogleCloudRetailV2betaRule/removeFacetAction": remove_facet_action "/retail:v2beta/GoogleCloudRetailV2betaRule/replacementAction": replacement_action @@ -299901,6 +299902,9 @@ "/retail:v2beta/GoogleCloudRetailV2betaRuleOnewaySynonymsAction/queryTerms/query_term": query_term "/retail:v2beta/GoogleCloudRetailV2betaRuleOnewaySynonymsAction/synonyms": synonyms "/retail:v2beta/GoogleCloudRetailV2betaRuleOnewaySynonymsAction/synonyms/synonym": synonym +"/retail:v2beta/GoogleCloudRetailV2betaRulePinAction": google_cloud_retail_v2beta_rule_pin_action +"/retail:v2beta/GoogleCloudRetailV2betaRulePinAction/pinMap": pin_map +"/retail:v2beta/GoogleCloudRetailV2betaRulePinAction/pinMap/pin_map": pin_map "/retail:v2beta/GoogleCloudRetailV2betaRuleRedirectAction": google_cloud_retail_v2beta_rule_redirect_action "/retail:v2beta/GoogleCloudRetailV2betaRuleRedirectAction/redirectUri": redirect_uri "/retail:v2beta/GoogleCloudRetailV2betaRuleRemoveFacetAction": google_cloud_retail_v2beta_rule_remove_facet_action diff --git a/generated/google-apis-retail_v2beta/CHANGELOG.md b/generated/google-apis-retail_v2beta/CHANGELOG.md index 16ea8c56b92..877ff1878a5 100644 --- a/generated/google-apis-retail_v2beta/CHANGELOG.md +++ b/generated/google-apis-retail_v2beta/CHANGELOG.md @@ -1,5 +1,10 @@ # Release history for google-apis-retail_v2beta +### v0.103.0 (2025-01-12) + +* Regenerated from discovery document revision 20250107 +* Regenerated using generator version 0.16.0 + ### v0.102.0 (2025-01-05) * Regenerated from discovery document revision 20241231 diff --git a/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/classes.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/classes.rb index 5a86bece37b..c853772a8bd 100644 --- a/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/classes.rb +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/classes.rb @@ -7030,6 +7030,21 @@ class GoogleCloudRetailV2betaRule # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleOnewaySynonymsAction] attr_accessor :oneway_synonyms_action + # Pins one or more specified products to a specific position in the results. * + # Rule Condition: Must specify non-empty Condition.query_terms (for search only) + # or Condition.page_categories (for browse only), but can't specify both. * + # Action Input: mapping of `[pin_position, product_id]` pairs (pin position uses + # 1-based indexing). * Action Result: Will pin products with matching ids to the + # position specified in the final result order. Example: Suppose the query is ` + # shoes`, the Condition.query_terms is `shoes` and the pin_map has ``1, "pid1"``, + # then product with `pid1` will be pinned to the top position in the final + # results. If multiple PinActions are matched to a single request the actions + # will be processed from most to least recently updated. Pins to positions + # larger than the max allowed page size of 120 are not allowed. + # Corresponds to the JSON property `pinAction` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRulePinAction] + attr_accessor :pin_action + # Redirects a shopper to a specific page. * Rule Condition: Must specify # Condition.query_terms. * Action Input: Request Query * Action Result: # Redirects shopper to provided uri. @@ -7075,6 +7090,7 @@ def update!(**args) @force_return_facet_action = args[:force_return_facet_action] if args.key?(:force_return_facet_action) @ignore_action = args[:ignore_action] if args.key?(:ignore_action) @oneway_synonyms_action = args[:oneway_synonyms_action] if args.key?(:oneway_synonyms_action) + @pin_action = args[:pin_action] if args.key?(:pin_action) @redirect_action = args[:redirect_action] if args.key?(:redirect_action) @remove_facet_action = args[:remove_facet_action] if args.key?(:remove_facet_action) @replacement_action = args[:replacement_action] if args.key?(:replacement_action) @@ -7300,6 +7316,43 @@ def update!(**args) end end + # Pins one or more specified products to a specific position in the results. * + # Rule Condition: Must specify non-empty Condition.query_terms (for search only) + # or Condition.page_categories (for browse only), but can't specify both. * + # Action Input: mapping of `[pin_position, product_id]` pairs (pin position uses + # 1-based indexing). * Action Result: Will pin products with matching ids to the + # position specified in the final result order. Example: Suppose the query is ` + # shoes`, the Condition.query_terms is `shoes` and the pin_map has ``1, "pid1"``, + # then product with `pid1` will be pinned to the top position in the final + # results. If multiple PinActions are matched to a single request the actions + # will be processed from most to least recently updated. Pins to positions + # larger than the max allowed page size of 120 are not allowed. + class GoogleCloudRetailV2betaRulePinAction + include Google::Apis::Core::Hashable + + # Required. A map of positions to product_ids. Partial matches per action are + # allowed, if a certain position in the map is already filled that `[position, + # product_id]` pair will be ignored but the rest may still be applied. This case + # will only occur if multiple pin actions are matched to a single request, as + # the map guarantees that pin positions are unique within the same action. + # Duplicate product_ids are not permitted within a single pin map. The max size + # of this map is 120, equivalent to the max [request page size](https://cloud. + # google.com/retail/docs/reference/rest/v2/projects.locations.catalogs. + # placements/search#request-body). + # Corresponds to the JSON property `pinMap` + # @return [Hash] + attr_accessor :pin_map + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pin_map = args[:pin_map] if args.key?(:pin_map) + end + end + # Redirects a shopper to a specific page. * Rule Condition: Must specify # Condition.query_terms. * Action Input: Request Query * Action Result: # Redirects shopper to provided uri. diff --git a/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/gem_version.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/gem_version.rb index bf30ba4a92c..a7d6dd45472 100644 --- a/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/gem_version.rb +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/gem_version.rb @@ -16,13 +16,13 @@ module Google module Apis module RetailV2beta # Version of the google-apis-retail_v2beta gem - GEM_VERSION = "0.102.0" + GEM_VERSION = "0.103.0" # Version of the code generator used to generate this client - GENERATOR_VERSION = "0.15.1" + GENERATOR_VERSION = "0.16.0" # Revision of the discovery document this client was generated from - REVISION = "20241231" + REVISION = "20250107" end end end diff --git a/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/representations.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/representations.rb index e255e613c68..66f50f4cf88 100644 --- a/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/representations.rb +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/representations.rb @@ -1330,6 +1330,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRetailV2betaRulePinAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRetailV2betaRuleRedirectAction class Representation < Google::Apis::Core::JsonRepresentation; end @@ -3518,6 +3524,8 @@ class Representation < Google::Apis::Core::JsonRepresentation property :oneway_synonyms_action, as: 'onewaySynonymsAction', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleOnewaySynonymsAction, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleOnewaySynonymsAction::Representation + property :pin_action, as: 'pinAction', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRulePinAction, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRulePinAction::Representation + property :redirect_action, as: 'redirectAction', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleRedirectAction, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleRedirectAction::Representation property :remove_facet_action, as: 'removeFacetAction', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleRemoveFacetAction, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleRemoveFacetAction::Representation @@ -3585,6 +3593,13 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleCloudRetailV2betaRulePinAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :pin_map, as: 'pinMap' + end + end + class GoogleCloudRetailV2betaRuleRedirectAction # @private class Representation < Google::Apis::Core::JsonRepresentation