Skip to content

Commit fa3821e

Browse files
chore: regenerate safebrowsing client
1 parent 5ec85f7 commit fa3821e

File tree

6 files changed

+377
-15
lines changed

6 files changed

+377
-15
lines changed

clients/google-api-services-safebrowsing/v5/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-safebrowsing</artifactId>
25-
<version>v5-rev20250518-2.0.0</version>
25+
<version>v5-rev20251214-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-safebrowsing:v5-rev20250518-2.0.0'
38+
implementation 'com.google.apis:google-api-services-safebrowsing:v5-rev20251214-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-safebrowsing/v5/2.0.0/com/google/api/services/safebrowsing/v5/Safebrowsing.java

Lines changed: 159 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public HashList hashList() {
154154
public class HashList {
155155

156156
/**
157-
* Get the latest contents of a hash list. A hash list may either by a threat list or a non-threat
157+
* Gets the latest contents of a hash list. A hash list may either by a threat list or a non-threat
158158
* list such as the Global Cache. This is a standard Get method as defined by
159159
* https://google.aip.dev/131 and the HTTP method is also GET.
160160
*
@@ -178,8 +178,8 @@ public class Get extends SafebrowsingRequest<com.google.api.services.safebrowsin
178178
private static final String REST_PATH = "v5/hashList/{name}";
179179

180180
/**
181-
* Get the latest contents of a hash list. A hash list may either by a threat list or a non-threat
182-
* list such as the Global Cache. This is a standard Get method as defined by
181+
* Gets the latest contents of a hash list. A hash list may either by a threat list or a non-
182+
* threat list such as the Global Cache. This is a standard Get method as defined by
183183
* https://google.aip.dev/131 and the HTTP method is also GET.
184184
*
185185
* Create a request for the method "hashList.get".
@@ -399,7 +399,7 @@ public HashLists hashLists() {
399399
public class HashLists {
400400

401401
/**
402-
* Get multiple hash lists at once. It is very common for a client to need to get multiple hash
402+
* Gets multiple hash lists at once. It is very common for a client to need to get multiple hash
403403
* lists. Using this method is preferred over using the regular Get method multiple times. This is a
404404
* standard batch Get method as defined by https://google.aip.dev/231 and the HTTP method is also
405405
* GET.
@@ -422,7 +422,7 @@ public class BatchGet extends SafebrowsingRequest<com.google.api.services.safebr
422422
private static final String REST_PATH = "v5/hashLists:batchGet";
423423

424424
/**
425-
* Get multiple hash lists at once. It is very common for a client to need to get multiple hash
425+
* Gets multiple hash lists at once. It is very common for a client to need to get multiple hash
426426
* lists. Using this method is preferred over using the regular Get method multiple times. This is
427427
* a standard batch Get method as defined by https://google.aip.dev/231 and the HTTP method is
428428
* also GET.
@@ -630,7 +630,7 @@ public BatchGet set(String parameterName, Object value) {
630630
}
631631
}
632632
/**
633-
* List hash lists. In the V5 API, Google will never remove a hash list that has ever been returned
633+
* Lists hash lists. In the V5 API, Google will never remove a hash list that has ever been returned
634634
* by this method. This enables clients to skip using this method and simply hard-code all hash
635635
* lists they need. This is a standard List method as defined by https://google.aip.dev/132 and the
636636
* HTTP method is GET.
@@ -653,7 +653,7 @@ public class List extends SafebrowsingRequest<com.google.api.services.safebrowsi
653653
private static final String REST_PATH = "v5/hashLists";
654654

655655
/**
656-
* List hash lists. In the V5 API, Google will never remove a hash list that has ever been
656+
* Lists hash lists. In the V5 API, Google will never remove a hash list that has ever been
657657
* returned by this method. This enables clients to skip using this method and simply hard-code
658658
* all hash lists they need. This is a standard List method as defined by
659659
* https://google.aip.dev/132 and the HTTP method is GET.
@@ -814,7 +814,7 @@ public Hashes hashes() {
814814
public class Hashes {
815815

816816
/**
817-
* Search for full hashes matching the specified prefixes. This is a custom method as defined by
817+
* Searches for full hashes matching the specified prefixes. This is a custom method as defined by
818818
* https://google.aip.dev/136 (the custom method refers to this method having a custom name within
819819
* Google's general API development nomenclature; it does not refer to using a custom HTTP method).
820820
*
@@ -836,7 +836,7 @@ public class Search extends SafebrowsingRequest<com.google.api.services.safebrow
836836
private static final String REST_PATH = "v5/hashes:search";
837837

838838
/**
839-
* Search for full hashes matching the specified prefixes. This is a custom method as defined by
839+
* Searches for full hashes matching the specified prefixes. This is a custom method as defined by
840840
* https://google.aip.dev/136 (the custom method refers to this method having a custom name within
841841
* Google's general API development nomenclature; it does not refer to using a custom HTTP
842842
* method).
@@ -957,6 +957,156 @@ public Search set(String parameterName, Object value) {
957957

958958
}
959959

960+
/**
961+
* An accessor for creating requests from the Urls collection.
962+
*
963+
* <p>The typical use is:</p>
964+
* <pre>
965+
* {@code Safebrowsing safebrowsing = new Safebrowsing(...);}
966+
* {@code Safebrowsing.Urls.List request = safebrowsing.urls().list(parameters ...)}
967+
* </pre>
968+
*
969+
* @return the resource collection
970+
*/
971+
public Urls urls() {
972+
return new Urls();
973+
}
974+
975+
/**
976+
* The "urls" collection of methods.
977+
*/
978+
public class Urls {
979+
980+
/**
981+
* Searches for URLs matching known threats. Each URL and it's host-suffix and path-prefix
982+
* expressions (up to a limited depth) are checked. This means that the response may contain URLs
983+
* that were not included in the request, but are expressions of the requested URLs.
984+
*
985+
* Create a request for the method "urls.search".
986+
*
987+
* This request holds the parameters needed by the safebrowsing server. After setting any optional
988+
* parameters, call the {@link Search#execute()} method to invoke the remote operation.
989+
*
990+
* @return the request
991+
*/
992+
public Search search() throws java.io.IOException {
993+
Search result = new Search();
994+
initialize(result);
995+
return result;
996+
}
997+
998+
public class Search extends SafebrowsingRequest<com.google.api.services.safebrowsing.v5.model.GoogleSecuritySafebrowsingV5SearchUrlsResponse> {
999+
1000+
private static final String REST_PATH = "v5/urls:search";
1001+
1002+
/**
1003+
* Searches for URLs matching known threats. Each URL and it's host-suffix and path-prefix
1004+
* expressions (up to a limited depth) are checked. This means that the response may contain URLs
1005+
* that were not included in the request, but are expressions of the requested URLs.
1006+
*
1007+
* Create a request for the method "urls.search".
1008+
*
1009+
* This request holds the parameters needed by the the safebrowsing server. After setting any
1010+
* optional parameters, call the {@link Search#execute()} method to invoke the remote operation.
1011+
* <p> {@link
1012+
* Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
1013+
* be called to initialize this instance immediately after invoking the constructor. </p>
1014+
*
1015+
* @since 1.13
1016+
*/
1017+
protected Search() {
1018+
super(Safebrowsing.this, "GET", REST_PATH, null, com.google.api.services.safebrowsing.v5.model.GoogleSecuritySafebrowsingV5SearchUrlsResponse.class);
1019+
}
1020+
1021+
@Override
1022+
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
1023+
return super.executeUsingHead();
1024+
}
1025+
1026+
@Override
1027+
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
1028+
return super.buildHttpRequestUsingHead();
1029+
}
1030+
1031+
@Override
1032+
public Search set$Xgafv(java.lang.String $Xgafv) {
1033+
return (Search) super.set$Xgafv($Xgafv);
1034+
}
1035+
1036+
@Override
1037+
public Search setAccessToken(java.lang.String accessToken) {
1038+
return (Search) super.setAccessToken(accessToken);
1039+
}
1040+
1041+
@Override
1042+
public Search setAlt(java.lang.String alt) {
1043+
return (Search) super.setAlt(alt);
1044+
}
1045+
1046+
@Override
1047+
public Search setCallback(java.lang.String callback) {
1048+
return (Search) super.setCallback(callback);
1049+
}
1050+
1051+
@Override
1052+
public Search setFields(java.lang.String fields) {
1053+
return (Search) super.setFields(fields);
1054+
}
1055+
1056+
@Override
1057+
public Search setKey(java.lang.String key) {
1058+
return (Search) super.setKey(key);
1059+
}
1060+
1061+
@Override
1062+
public Search setOauthToken(java.lang.String oauthToken) {
1063+
return (Search) super.setOauthToken(oauthToken);
1064+
}
1065+
1066+
@Override
1067+
public Search setPrettyPrint(java.lang.Boolean prettyPrint) {
1068+
return (Search) super.setPrettyPrint(prettyPrint);
1069+
}
1070+
1071+
@Override
1072+
public Search setQuotaUser(java.lang.String quotaUser) {
1073+
return (Search) super.setQuotaUser(quotaUser);
1074+
}
1075+
1076+
@Override
1077+
public Search setUploadType(java.lang.String uploadType) {
1078+
return (Search) super.setUploadType(uploadType);
1079+
}
1080+
1081+
@Override
1082+
public Search setUploadProtocol(java.lang.String uploadProtocol) {
1083+
return (Search) super.setUploadProtocol(uploadProtocol);
1084+
}
1085+
1086+
/** Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs. */
1087+
@com.google.api.client.util.Key
1088+
private java.util.List<java.lang.String> urls;
1089+
1090+
/** Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs.
1091+
*/
1092+
public java.util.List<java.lang.String> getUrls() {
1093+
return urls;
1094+
}
1095+
1096+
/** Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs. */
1097+
public Search setUrls(java.util.List<java.lang.String> urls) {
1098+
this.urls = urls;
1099+
return this;
1100+
}
1101+
1102+
@Override
1103+
public Search set(String parameterName, Object value) {
1104+
return (Search) super.set(parameterName, value);
1105+
}
1106+
}
1107+
1108+
}
1109+
9601110
/**
9611111
* Builder for {@link Safebrowsing}.
9621112
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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.safebrowsing.v5.model;
18+
19+
/**
20+
* The response returned after searching threats matching the specified URLs. If nothing is found,
21+
* the server will return an OK status (HTTP status code 200) with the `threats` field empty, rather
22+
* than returning a NOT_FOUND status (HTTP status code 404).
23+
*
24+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
25+
* transmitted over HTTP when working with the Safe Browsing API. For a detailed explanation see:
26+
* <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>
27+
* </p>
28+
*
29+
* @author Google, Inc.
30+
*/
31+
@SuppressWarnings("javadoc")
32+
public final class GoogleSecuritySafebrowsingV5SearchUrlsResponse extends com.google.api.client.json.GenericJson {
33+
34+
/**
35+
* The client-side cache duration. The client MUST add this duration to the current time to
36+
* determine the expiration time. The expiration time then applies to every URL queried by the
37+
* client in the request, regardless of how many URLs are returned in the response. Even if the
38+
* server returns no matches for a particular URL, this fact MUST also be cached by the client. If
39+
* and only if the field `threats` is empty, the client MAY increase the `cache_duration` to
40+
* determine a new expiration that is later than that specified by the server. In any case, the
41+
* increased cache duration must not be longer than 24 hours. Important: the client MUST NOT
42+
* assume that the server will return the same cache duration for all responses. The server MAY
43+
* choose different cache durations for different responses depending on the situation.
44+
* The value may be {@code null}.
45+
*/
46+
@com.google.api.client.util.Key
47+
private String cacheDuration;
48+
49+
/**
50+
* Unordered list. The unordered list of threat matches found. Each entry contains a URL and the
51+
* threat types that were found matching that URL. The list size can be greater than the number of
52+
* URLs in the request as the all expressions of the URL would've been considered.
53+
* The value may be {@code null}.
54+
*/
55+
@com.google.api.client.util.Key
56+
private java.util.List<GoogleSecuritySafebrowsingV5ThreatUrl> threats;
57+
58+
/**
59+
* The client-side cache duration. The client MUST add this duration to the current time to
60+
* determine the expiration time. The expiration time then applies to every URL queried by the
61+
* client in the request, regardless of how many URLs are returned in the response. Even if the
62+
* server returns no matches for a particular URL, this fact MUST also be cached by the client. If
63+
* and only if the field `threats` is empty, the client MAY increase the `cache_duration` to
64+
* determine a new expiration that is later than that specified by the server. In any case, the
65+
* increased cache duration must not be longer than 24 hours. Important: the client MUST NOT
66+
* assume that the server will return the same cache duration for all responses. The server MAY
67+
* choose different cache durations for different responses depending on the situation.
68+
* @return value or {@code null} for none
69+
*/
70+
public String getCacheDuration() {
71+
return cacheDuration;
72+
}
73+
74+
/**
75+
* The client-side cache duration. The client MUST add this duration to the current time to
76+
* determine the expiration time. The expiration time then applies to every URL queried by the
77+
* client in the request, regardless of how many URLs are returned in the response. Even if the
78+
* server returns no matches for a particular URL, this fact MUST also be cached by the client. If
79+
* and only if the field `threats` is empty, the client MAY increase the `cache_duration` to
80+
* determine a new expiration that is later than that specified by the server. In any case, the
81+
* increased cache duration must not be longer than 24 hours. Important: the client MUST NOT
82+
* assume that the server will return the same cache duration for all responses. The server MAY
83+
* choose different cache durations for different responses depending on the situation.
84+
* @param cacheDuration cacheDuration or {@code null} for none
85+
*/
86+
public GoogleSecuritySafebrowsingV5SearchUrlsResponse setCacheDuration(String cacheDuration) {
87+
this.cacheDuration = cacheDuration;
88+
return this;
89+
}
90+
91+
/**
92+
* Unordered list. The unordered list of threat matches found. Each entry contains a URL and the
93+
* threat types that were found matching that URL. The list size can be greater than the number of
94+
* URLs in the request as the all expressions of the URL would've been considered.
95+
* @return value or {@code null} for none
96+
*/
97+
public java.util.List<GoogleSecuritySafebrowsingV5ThreatUrl> getThreats() {
98+
return threats;
99+
}
100+
101+
/**
102+
* Unordered list. The unordered list of threat matches found. Each entry contains a URL and the
103+
* threat types that were found matching that URL. The list size can be greater than the number of
104+
* URLs in the request as the all expressions of the URL would've been considered.
105+
* @param threats threats or {@code null} for none
106+
*/
107+
public GoogleSecuritySafebrowsingV5SearchUrlsResponse setThreats(java.util.List<GoogleSecuritySafebrowsingV5ThreatUrl> threats) {
108+
this.threats = threats;
109+
return this;
110+
}
111+
112+
@Override
113+
public GoogleSecuritySafebrowsingV5SearchUrlsResponse set(String fieldName, Object value) {
114+
return (GoogleSecuritySafebrowsingV5SearchUrlsResponse) super.set(fieldName, value);
115+
}
116+
117+
@Override
118+
public GoogleSecuritySafebrowsingV5SearchUrlsResponse clone() {
119+
return (GoogleSecuritySafebrowsingV5SearchUrlsResponse) super.clone();
120+
}
121+
122+
}

0 commit comments

Comments
 (0)