Skip to content

Commit 991c933

Browse files
1 parent 7af8ddd commit 991c933

File tree

15 files changed

+603
-432
lines changed

15 files changed

+603
-432
lines changed

clients/google-api-services-retail/v2/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-retail</artifactId>
25-
<version>v2-rev20241205-2.0.0</version>
25+
<version>v2-rev20241220-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-retail:v2-rev20241205-2.0.0'
38+
implementation 'com.google.apis:google-api-services-retail:v2-rev20241220-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-retail/v2/2.0.0/com/google/api/services/retail/v2/CloudRetail.java

Lines changed: 14 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -10095,9 +10095,10 @@ public UserEvents userEvents() {
1009510095
public class UserEvents {
1009610096

1009710097
/**
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.
1010110102
*
1010210103
* Create a request for the method "userEvents.collect".
1010310104
*
@@ -10106,10 +10107,11 @@ public class UserEvents {
1010610107
*
1010710108
* @param parent Required. The parent catalog name, such as
1010810109
* `projects/1234/locations/global/catalogs/default_catalog`.
10110+
* @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2CollectUserEventRequest}
1010910111
* @return the request
1011010112
*/
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);
1011310115
initialize(result);
1011410116
return result;
1011510117
}
@@ -10122,9 +10124,10 @@ public class Collect extends CloudRetailRequest<com.google.api.services.retail.v
1012210124
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$");
1012310125

1012410126
/**
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.
1012810131
*
1012910132
* Create a request for the method "userEvents.collect".
1013010133
*
@@ -10136,10 +10139,11 @@ public class Collect extends CloudRetailRequest<com.google.api.services.retail.v
1013610139
*
1013710140
* @param parent Required. The parent catalog name, such as
1013810141
* `projects/1234/locations/global/catalogs/default_catalog`.
10142+
* @param content the {@link com.google.api.services.retail.v2.model.GoogleCloudRetailV2CollectUserEventRequest}
1013910143
* @since 1.13
1014010144
*/
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);
1014310147
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
1014410148
if (!getSuppressPatternChecks()) {
1014510149
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
@@ -10148,16 +10152,6 @@ protected Collect(java.lang.String parent) {
1014810152
}
1014910153
}
1015010154

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-
1016110155
@Override
1016210156
public Collect set$Xgafv(java.lang.String $Xgafv) {
1016310157
return (Collect) super.set$Xgafv($Xgafv);
@@ -10241,124 +10235,6 @@ public Collect setParent(java.lang.String parent) {
1024110235
return this;
1024210236
}
1024310237

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-
1036210238
@Override
1036310239
public Collect set(String parameterName, Object value) {
1036410240
return (Collect) super.set(parameterName, value);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.retail.v2.model;
18+
19+
/**
20+
* Request message for CollectUserEvent method.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Vertex AI Search for Retail API. For a detailed
24+
* explanation see:
25+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
26+
* </p>
27+
*
28+
* @author Google, Inc.
29+
*/
30+
@SuppressWarnings("javadoc")
31+
public final class GoogleCloudRetailV2CollectUserEventRequest extends com.google.api.client.json.GenericJson {
32+
33+
/**
34+
* The event timestamp in milliseconds. This prevents browser caching of otherwise identical get
35+
* requests. The name is abbreviated to reduce the payload bytes.
36+
* The value may be {@code null}.
37+
*/
38+
@com.google.api.client.util.Key @com.google.api.client.json.JsonString
39+
private java.lang.Long ets;
40+
41+
/**
42+
* The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule
43+
* for the GA4 user event schema.
44+
* The value may be {@code null}.
45+
*/
46+
@com.google.api.client.util.Key
47+
private java.lang.String prebuiltRule;
48+
49+
/**
50+
* An arbitrary serialized JSON string that contains necessary information that can comprise a
51+
* user event. When this field is specified, the user_event field will be ignored. Note: line-
52+
* delimited JSON is not supported, a single JSON only.
53+
* The value may be {@code null}.
54+
*/
55+
@com.google.api.client.util.Key
56+
private java.lang.String rawJson;
57+
58+
/**
59+
* The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000
60+
* characters. This is often more useful than the referer URL, because many browsers only send the
61+
* domain for 3rd party requests.
62+
* The value may be {@code null}.
63+
*/
64+
@com.google.api.client.util.Key
65+
private java.lang.String uri;
66+
67+
/**
68+
* Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
69+
* The value may be {@code null}.
70+
*/
71+
@com.google.api.client.util.Key
72+
private java.lang.String userEvent;
73+
74+
/**
75+
* The event timestamp in milliseconds. This prevents browser caching of otherwise identical get
76+
* requests. The name is abbreviated to reduce the payload bytes.
77+
* @return value or {@code null} for none
78+
*/
79+
public java.lang.Long getEts() {
80+
return ets;
81+
}
82+
83+
/**
84+
* The event timestamp in milliseconds. This prevents browser caching of otherwise identical get
85+
* requests. The name is abbreviated to reduce the payload bytes.
86+
* @param ets ets or {@code null} for none
87+
*/
88+
public GoogleCloudRetailV2CollectUserEventRequest setEts(java.lang.Long ets) {
89+
this.ets = ets;
90+
return this;
91+
}
92+
93+
/**
94+
* The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule
95+
* for the GA4 user event schema.
96+
* @return value or {@code null} for none
97+
*/
98+
public java.lang.String getPrebuiltRule() {
99+
return prebuiltRule;
100+
}
101+
102+
/**
103+
* The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule
104+
* for the GA4 user event schema.
105+
* @param prebuiltRule prebuiltRule or {@code null} for none
106+
*/
107+
public GoogleCloudRetailV2CollectUserEventRequest setPrebuiltRule(java.lang.String prebuiltRule) {
108+
this.prebuiltRule = prebuiltRule;
109+
return this;
110+
}
111+
112+
/**
113+
* An arbitrary serialized JSON string that contains necessary information that can comprise a
114+
* user event. When this field is specified, the user_event field will be ignored. Note: line-
115+
* delimited JSON is not supported, a single JSON only.
116+
* @return value or {@code null} for none
117+
*/
118+
public java.lang.String getRawJson() {
119+
return rawJson;
120+
}
121+
122+
/**
123+
* An arbitrary serialized JSON string that contains necessary information that can comprise a
124+
* user event. When this field is specified, the user_event field will be ignored. Note: line-
125+
* delimited JSON is not supported, a single JSON only.
126+
* @param rawJson rawJson or {@code null} for none
127+
*/
128+
public GoogleCloudRetailV2CollectUserEventRequest setRawJson(java.lang.String rawJson) {
129+
this.rawJson = rawJson;
130+
return this;
131+
}
132+
133+
/**
134+
* The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000
135+
* characters. This is often more useful than the referer URL, because many browsers only send the
136+
* domain for 3rd party requests.
137+
* @return value or {@code null} for none
138+
*/
139+
public java.lang.String getUri() {
140+
return uri;
141+
}
142+
143+
/**
144+
* The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000
145+
* characters. This is often more useful than the referer URL, because many browsers only send the
146+
* domain for 3rd party requests.
147+
* @param uri uri or {@code null} for none
148+
*/
149+
public GoogleCloudRetailV2CollectUserEventRequest setUri(java.lang.String uri) {
150+
this.uri = uri;
151+
return this;
152+
}
153+
154+
/**
155+
* Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
156+
* @return value or {@code null} for none
157+
*/
158+
public java.lang.String getUserEvent() {
159+
return userEvent;
160+
}
161+
162+
/**
163+
* Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
164+
* @param userEvent userEvent or {@code null} for none
165+
*/
166+
public GoogleCloudRetailV2CollectUserEventRequest setUserEvent(java.lang.String userEvent) {
167+
this.userEvent = userEvent;
168+
return this;
169+
}
170+
171+
@Override
172+
public GoogleCloudRetailV2CollectUserEventRequest set(String fieldName, Object value) {
173+
return (GoogleCloudRetailV2CollectUserEventRequest) super.set(fieldName, value);
174+
}
175+
176+
@Override
177+
public GoogleCloudRetailV2CollectUserEventRequest clone() {
178+
return (GoogleCloudRetailV2CollectUserEventRequest) super.clone();
179+
}
180+
181+
}

0 commit comments

Comments
 (0)