Skip to content

Commit fe5d104

Browse files
feat: Automated regeneration of retail v2 client (googleapis#21117)
Auto-created at 2024-12-22 10:05:47 +0000 using the toys pull request generator.
1 parent d32c80a commit fe5d104

File tree

6 files changed

+91
-32
lines changed

6 files changed

+91
-32
lines changed

api_names_out.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294804,6 +294804,12 @@
294804294804
"/retail:v2/GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig/facetValues": facet_values
294805294805
"/retail:v2/GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig/facetValues/facet_value": facet_value
294806294806
"/retail:v2/GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig/rerankFacet": rerank_facet
294807+
"/retail:v2/GoogleCloudRetailV2CollectUserEventRequest": google_cloud_retail_v2_collect_user_event_request
294808+
"/retail:v2/GoogleCloudRetailV2CollectUserEventRequest/ets": ets
294809+
"/retail:v2/GoogleCloudRetailV2CollectUserEventRequest/prebuiltRule": prebuilt_rule
294810+
"/retail:v2/GoogleCloudRetailV2CollectUserEventRequest/rawJson": raw_json
294811+
"/retail:v2/GoogleCloudRetailV2CollectUserEventRequest/uri": uri
294812+
"/retail:v2/GoogleCloudRetailV2CollectUserEventRequest/userEvent": user_event
294807294813
"/retail:v2/GoogleCloudRetailV2ColorInfo": google_cloud_retail_v2_color_info
294808294814
"/retail:v2/GoogleCloudRetailV2ColorInfo/colorFamilies": color_families
294809294815
"/retail:v2/GoogleCloudRetailV2ColorInfo/colorFamilies/color_family": color_family

generated/google-apis-retail_v2/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release history for google-apis-retail_v2
22

3+
### v0.108.0 (2024-12-22)
4+
5+
* Regenerated from discovery document revision 20241220
6+
37
### v0.107.0 (2024-12-15)
48

59
* Regenerated from discovery document revision 20241205

generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,58 @@ def update!(**args)
10331033
end
10341034
end
10351035

1036+
# Request message for CollectUserEvent method.
1037+
class GoogleCloudRetailV2CollectUserEventRequest
1038+
include Google::Apis::Core::Hashable
1039+
1040+
# The event timestamp in milliseconds. This prevents browser caching of
1041+
# otherwise identical get requests. The name is abbreviated to reduce the
1042+
# payload bytes.
1043+
# Corresponds to the JSON property `ets`
1044+
# @return [Fixnum]
1045+
attr_accessor :ets
1046+
1047+
# The prebuilt rule name that can convert a specific type of raw_json. For
1048+
# example: "ga4_bq" rule for the GA4 user event schema.
1049+
# Corresponds to the JSON property `prebuiltRule`
1050+
# @return [String]
1051+
attr_accessor :prebuilt_rule
1052+
1053+
# An arbitrary serialized JSON string that contains necessary information that
1054+
# can comprise a user event. When this field is specified, the user_event field
1055+
# will be ignored. Note: line-delimited JSON is not supported, a single JSON
1056+
# only.
1057+
# Corresponds to the JSON property `rawJson`
1058+
# @return [String]
1059+
attr_accessor :raw_json
1060+
1061+
# The URL including cgi-parameters but excluding the hash fragment with a length
1062+
# limit of 5,000 characters. This is often more useful than the referer URL,
1063+
# because many browsers only send the domain for 3rd party requests.
1064+
# Corresponds to the JSON property `uri`
1065+
# @return [String]
1066+
attr_accessor :uri
1067+
1068+
# Required. URL encoded UserEvent proto with a length limit of 2,000,000
1069+
# characters.
1070+
# Corresponds to the JSON property `userEvent`
1071+
# @return [String]
1072+
attr_accessor :user_event
1073+
1074+
def initialize(**args)
1075+
update!(**args)
1076+
end
1077+
1078+
# Update properties of this object
1079+
def update!(**args)
1080+
@ets = args[:ets] if args.key?(:ets)
1081+
@prebuilt_rule = args[:prebuilt_rule] if args.key?(:prebuilt_rule)
1082+
@raw_json = args[:raw_json] if args.key?(:raw_json)
1083+
@uri = args[:uri] if args.key?(:uri)
1084+
@user_event = args[:user_event] if args.key?(:user_event)
1085+
end
1086+
end
1087+
10361088
# The color information of a Product.
10371089
class GoogleCloudRetailV2ColorInfo
10381090
include Google::Apis::Core::Hashable

generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module RetailV2
1818
# Version of the google-apis-retail_v2 gem
19-
GEM_VERSION = "0.107.0"
19+
GEM_VERSION = "0.108.0"
2020

2121
# Version of the code generator used to generate this client
2222
GENERATOR_VERSION = "0.15.1"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20241205"
25+
REVISION = "20241220"
2626
end
2727
end
2828
end

generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
190190
include Google::Apis::Core::JsonObjectSupport
191191
end
192192

193+
class GoogleCloudRetailV2CollectUserEventRequest
194+
class Representation < Google::Apis::Core::JsonRepresentation; end
195+
196+
include Google::Apis::Core::JsonObjectSupport
197+
end
198+
193199
class GoogleCloudRetailV2ColorInfo
194200
class Representation < Google::Apis::Core::JsonRepresentation; end
195201

@@ -1798,6 +1804,17 @@ class Representation < Google::Apis::Core::JsonRepresentation
17981804
end
17991805
end
18001806

1807+
class GoogleCloudRetailV2CollectUserEventRequest
1808+
# @private
1809+
class Representation < Google::Apis::Core::JsonRepresentation
1810+
property :ets, :numeric_string => true, as: 'ets'
1811+
property :prebuilt_rule, as: 'prebuiltRule'
1812+
property :raw_json, as: 'rawJson'
1813+
property :uri, as: 'uri'
1814+
property :user_event, as: 'userEvent'
1815+
end
1816+
end
1817+
18011818
class GoogleCloudRetailV2ColorInfo
18021819
# @private
18031820
class Representation < Google::Apis::Core::JsonRepresentation

generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,32 +2362,15 @@ def search_project_location_catalog_serving_configs(placement, google_cloud_reta
23622362
execute_or_queue_command(command, &block)
23632363
end
23642364

2365-
# Writes a single user event from the browser. This uses a GET request to due to
2366-
# browser restriction of POST-ing to a 3rd party domain. This method is used
2367-
# only by the Retail API JavaScript pixel and Google Tag Manager. Users should
2368-
# not call this method directly.
2365+
# Writes a single user event from the browser. For larger user event payload
2366+
# over 16 KB, the POST method should be used instead, otherwise a 400 Bad
2367+
# Request error is returned. This method is used only by the Retail API
2368+
# JavaScript pixel and Google Tag Manager. Users should not call this method
2369+
# directly.
23692370
# @param [String] parent
23702371
# Required. The parent catalog name, such as `projects/1234/locations/global/
23712372
# catalogs/default_catalog`.
2372-
# @param [Fixnum] ets
2373-
# The event timestamp in milliseconds. This prevents browser caching of
2374-
# otherwise identical get requests. The name is abbreviated to reduce the
2375-
# payload bytes.
2376-
# @param [String] prebuilt_rule
2377-
# The prebuilt rule name that can convert a specific type of raw_json. For
2378-
# example: "ga4_bq" rule for the GA4 user event schema.
2379-
# @param [String] raw_json
2380-
# An arbitrary serialized JSON string that contains necessary information that
2381-
# can comprise a user event. When this field is specified, the user_event field
2382-
# will be ignored. Note: line-delimited JSON is not supported, a single JSON
2383-
# only.
2384-
# @param [String] uri
2385-
# The URL including cgi-parameters but excluding the hash fragment with a length
2386-
# limit of 5,000 characters. This is often more useful than the referer URL,
2387-
# because many browsers only send the domain for 3rd party requests.
2388-
# @param [String] user_event
2389-
# Required. URL encoded UserEvent proto with a length limit of 2,000,000
2390-
# characters.
2373+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2CollectUserEventRequest] google_cloud_retail_v2_collect_user_event_request_object
23912374
# @param [String] fields
23922375
# Selector specifying which fields to include in a partial response.
23932376
# @param [String] quota_user
@@ -2405,16 +2388,13 @@ def search_project_location_catalog_serving_configs(placement, google_cloud_reta
24052388
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
24062389
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
24072390
# @raise [Google::Apis::AuthorizationError] Authorization is required
2408-
def collect_project_location_catalog_user_event(parent, ets: nil, prebuilt_rule: nil, raw_json: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil, &block)
2409-
command = make_simple_command(:get, 'v2/{+parent}/userEvents:collect', options)
2391+
def collect_project_location_catalog_user_event(parent, google_cloud_retail_v2_collect_user_event_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2392+
command = make_simple_command(:post, 'v2/{+parent}/userEvents:collect', options)
2393+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2CollectUserEventRequest::Representation
2394+
command.request_object = google_cloud_retail_v2_collect_user_event_request_object
24102395
command.response_representation = Google::Apis::RetailV2::GoogleApiHttpBody::Representation
24112396
command.response_class = Google::Apis::RetailV2::GoogleApiHttpBody
24122397
command.params['parent'] = parent unless parent.nil?
2413-
command.query['ets'] = ets unless ets.nil?
2414-
command.query['prebuiltRule'] = prebuilt_rule unless prebuilt_rule.nil?
2415-
command.query['rawJson'] = raw_json unless raw_json.nil?
2416-
command.query['uri'] = uri unless uri.nil?
2417-
command.query['userEvent'] = user_event unless user_event.nil?
24182398
command.query['fields'] = fields unless fields.nil?
24192399
command.query['quotaUser'] = quota_user unless quota_user.nil?
24202400
execute_or_queue_command(command, &block)

0 commit comments

Comments
 (0)