@@ -10095,9 +10095,10 @@ public UserEvents userEvents() {
10095
10095
public class UserEvents {
10096
10096
10097
10097
/**
10098
- * Writes a single user event from the browser. This uses a GET request to due to browser
10099
- * restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API
10100
- * JavaScript pixel and Google Tag Manager. Users should not call this method directly.
10098
+ * Writes a single user event from the browser. For larger user event payload over 16 KB, the POST
10099
+ * method should be used instead, otherwise a 400 Bad Request error is returned. This method is used
10100
+ * only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method
10101
+ * directly.
10101
10102
*
10102
10103
* Create a request for the method "userEvents.collect".
10103
10104
*
@@ -10106,10 +10107,11 @@ public class UserEvents {
10106
10107
*
10107
10108
* @param parent Required. The parent catalog name, such as
10108
10109
* `projects/1234/locations/global/catalogs/default_catalog`.
10110
+ * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2CollectUserEventRequest}
10109
10111
* @return the request
10110
10112
*/
10111
- public Collect collect(java.lang.String parent) throws java.io.IOException {
10112
- Collect result = new Collect(parent);
10113
+ public Collect collect(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2CollectUserEventRequest content ) throws java.io.IOException {
10114
+ Collect result = new Collect(parent, content );
10113
10115
initialize(result);
10114
10116
return result;
10115
10117
}
@@ -10122,9 +10124,10 @@ public class Collect extends CloudRetailRequest<com.google.api.services.retail.v
10122
10124
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$");
10123
10125
10124
10126
/**
10125
- * Writes a single user event from the browser. This uses a GET request to due to browser
10126
- * restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API
10127
- * JavaScript pixel and Google Tag Manager. Users should not call this method directly.
10127
+ * Writes a single user event from the browser. For larger user event payload over 16 KB, the POST
10128
+ * method should be used instead, otherwise a 400 Bad Request error is returned. This method is
10129
+ * used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this
10130
+ * method directly.
10128
10131
*
10129
10132
* Create a request for the method "userEvents.collect".
10130
10133
*
@@ -10136,10 +10139,11 @@ public class Collect extends CloudRetailRequest<com.google.api.services.retail.v
10136
10139
*
10137
10140
* @param parent Required. The parent catalog name, such as
10138
10141
* `projects/1234/locations/global/catalogs/default_catalog`.
10142
+ * @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2CollectUserEventRequest}
10139
10143
* @since 1.13
10140
10144
*/
10141
- protected Collect(java.lang.String parent) {
10142
- super(CloudRetail.this, "GET ", REST_PATH, null , com.google.api.services.retail.v2.model.GoogleApiHttpBody.class);
10145
+ protected Collect(java.lang.String parent, com.google.api.services.retail.v2.model.GoogleCloudRetailV2CollectUserEventRequest content ) {
10146
+ super(CloudRetail.this, "POST ", REST_PATH, content , com.google.api.services.retail.v2.model.GoogleApiHttpBody.class);
10143
10147
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
10144
10148
if (!getSuppressPatternChecks()) {
10145
10149
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
@@ -10148,16 +10152,6 @@ protected Collect(java.lang.String parent) {
10148
10152
}
10149
10153
}
10150
10154
10151
- @Override
10152
- public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
10153
- return super.executeUsingHead();
10154
- }
10155
-
10156
- @Override
10157
- public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
10158
- return super.buildHttpRequestUsingHead();
10159
- }
10160
-
10161
10155
@Override
10162
10156
public Collect set$Xgafv(java.lang.String $Xgafv) {
10163
10157
return (Collect) super.set$Xgafv($Xgafv);
@@ -10241,124 +10235,6 @@ public Collect setParent(java.lang.String parent) {
10241
10235
return this;
10242
10236
}
10243
10237
10244
- /**
10245
- * The event timestamp in milliseconds. This prevents browser caching of otherwise
10246
- * identical get requests. The name is abbreviated to reduce the payload bytes.
10247
- */
10248
- @com.google.api.client.util.Key
10249
- private java.lang.Long ets;
10250
-
10251
- /** The event timestamp in milliseconds. This prevents browser caching of otherwise identical get
10252
- requests. The name is abbreviated to reduce the payload bytes.
10253
- */
10254
- public java.lang.Long getEts() {
10255
- return ets;
10256
- }
10257
-
10258
- /**
10259
- * The event timestamp in milliseconds. This prevents browser caching of otherwise
10260
- * identical get requests. The name is abbreviated to reduce the payload bytes.
10261
- */
10262
- public Collect setEts(java.lang.Long ets) {
10263
- this.ets = ets;
10264
- return this;
10265
- }
10266
-
10267
- /**
10268
- * The prebuilt rule name that can convert a specific type of raw_json. For example:
10269
- * "ga4_bq" rule for the GA4 user event schema.
10270
- */
10271
- @com.google.api.client.util.Key
10272
- private java.lang.String prebuiltRule;
10273
-
10274
- /** The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule for
10275
- the GA4 user event schema.
10276
- */
10277
- public java.lang.String getPrebuiltRule() {
10278
- return prebuiltRule;
10279
- }
10280
-
10281
- /**
10282
- * The prebuilt rule name that can convert a specific type of raw_json. For example:
10283
- * "ga4_bq" rule for the GA4 user event schema.
10284
- */
10285
- public Collect setPrebuiltRule(java.lang.String prebuiltRule) {
10286
- this.prebuiltRule = prebuiltRule;
10287
- return this;
10288
- }
10289
-
10290
- /**
10291
- * An arbitrary serialized JSON string that contains necessary information that can
10292
- * comprise a user event. When this field is specified, the user_event field will be
10293
- * ignored. Note: line-delimited JSON is not supported, a single JSON only.
10294
- */
10295
- @com.google.api.client.util.Key
10296
- private java.lang.String rawJson;
10297
-
10298
- /** An arbitrary serialized JSON string that contains necessary information that can comprise a user
10299
- event. When this field is specified, the user_event field will be ignored. Note: line-delimited
10300
- JSON is not supported, a single JSON only.
10301
- */
10302
- public java.lang.String getRawJson() {
10303
- return rawJson;
10304
- }
10305
-
10306
- /**
10307
- * An arbitrary serialized JSON string that contains necessary information that can
10308
- * comprise a user event. When this field is specified, the user_event field will be
10309
- * ignored. Note: line-delimited JSON is not supported, a single JSON only.
10310
- */
10311
- public Collect setRawJson(java.lang.String rawJson) {
10312
- this.rawJson = rawJson;
10313
- return this;
10314
- }
10315
-
10316
- /**
10317
- * The URL including cgi-parameters but excluding the hash fragment with a length limit
10318
- * of 5,000 characters. This is often more useful than the referer URL, because many
10319
- * browsers only send the domain for 3rd party requests.
10320
- */
10321
- @com.google.api.client.util.Key
10322
- private java.lang.String uri;
10323
-
10324
- /** The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000
10325
- characters. This is often more useful than the referer URL, because many browsers only send the
10326
- domain for 3rd party requests.
10327
- */
10328
- public java.lang.String getUri() {
10329
- return uri;
10330
- }
10331
-
10332
- /**
10333
- * The URL including cgi-parameters but excluding the hash fragment with a length limit
10334
- * of 5,000 characters. This is often more useful than the referer URL, because many
10335
- * browsers only send the domain for 3rd party requests.
10336
- */
10337
- public Collect setUri(java.lang.String uri) {
10338
- this.uri = uri;
10339
- return this;
10340
- }
10341
-
10342
- /**
10343
- * Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
10344
- */
10345
- @com.google.api.client.util.Key
10346
- private java.lang.String userEvent;
10347
-
10348
- /** Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
10349
- */
10350
- public java.lang.String getUserEvent() {
10351
- return userEvent;
10352
- }
10353
-
10354
- /**
10355
- * Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
10356
- */
10357
- public Collect setUserEvent(java.lang.String userEvent) {
10358
- this.userEvent = userEvent;
10359
- return this;
10360
- }
10361
-
10362
10238
@Override
10363
10239
public Collect set(String parameterName, Object value) {
10364
10240
return (Collect) super.set(parameterName, value);
0 commit comments