Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/google-api-services-safebrowsing/v5/2.0.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-safebrowsing</artifactId>
<version>v5-rev20250518-2.0.0</version>
<version>v5-rev20251214-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-safebrowsing:v5-rev20250518-2.0.0'
implementation 'com.google.apis:google-api-services-safebrowsing:v5-rev20251214-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public HashList hashList() {
public class HashList {

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

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

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

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

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

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

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

}

/**
* An accessor for creating requests from the Urls collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Safebrowsing safebrowsing = new Safebrowsing(...);}
* {@code Safebrowsing.Urls.List request = safebrowsing.urls().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Urls urls() {
return new Urls();
}

/**
* The "urls" collection of methods.
*/
public class Urls {

/**
* Searches for URLs matching known threats. Each URL and it's host-suffix and path-prefix
* expressions (up to a limited depth) are checked. This means that the response may contain URLs
* that were not included in the request, but are expressions of the requested URLs.
*
* Create a request for the method "urls.search".
*
* This request holds the parameters needed by the safebrowsing server. After setting any optional
* parameters, call the {@link Search#execute()} method to invoke the remote operation.
*
* @return the request
*/
public Search search() throws java.io.IOException {
Search result = new Search();
initialize(result);
return result;
}

public class Search extends SafebrowsingRequest<com.google.api.services.safebrowsing.v5.model.GoogleSecuritySafebrowsingV5SearchUrlsResponse> {

private static final String REST_PATH = "v5/urls:search";

/**
* Searches for URLs matching known threats. Each URL and it's host-suffix and path-prefix
* expressions (up to a limited depth) are checked. This means that the response may contain URLs
* that were not included in the request, but are expressions of the requested URLs.
*
* Create a request for the method "urls.search".
*
* This request holds the parameters needed by the the safebrowsing server. After setting any
* optional parameters, call the {@link Search#execute()} method to invoke the remote operation.
* <p> {@link
* Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @since 1.13
*/
protected Search() {
super(Safebrowsing.this, "GET", REST_PATH, null, com.google.api.services.safebrowsing.v5.model.GoogleSecuritySafebrowsingV5SearchUrlsResponse.class);
}

@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}

@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}

@Override
public Search set$Xgafv(java.lang.String $Xgafv) {
return (Search) super.set$Xgafv($Xgafv);
}

@Override
public Search setAccessToken(java.lang.String accessToken) {
return (Search) super.setAccessToken(accessToken);
}

@Override
public Search setAlt(java.lang.String alt) {
return (Search) super.setAlt(alt);
}

@Override
public Search setCallback(java.lang.String callback) {
return (Search) super.setCallback(callback);
}

@Override
public Search setFields(java.lang.String fields) {
return (Search) super.setFields(fields);
}

@Override
public Search setKey(java.lang.String key) {
return (Search) super.setKey(key);
}

@Override
public Search setOauthToken(java.lang.String oauthToken) {
return (Search) super.setOauthToken(oauthToken);
}

@Override
public Search setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Search) super.setPrettyPrint(prettyPrint);
}

@Override
public Search setQuotaUser(java.lang.String quotaUser) {
return (Search) super.setQuotaUser(quotaUser);
}

@Override
public Search setUploadType(java.lang.String uploadType) {
return (Search) super.setUploadType(uploadType);
}

@Override
public Search setUploadProtocol(java.lang.String uploadProtocol) {
return (Search) super.setUploadProtocol(uploadProtocol);
}

/** Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs. */
@com.google.api.client.util.Key
private java.util.List<java.lang.String> urls;

/** Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs.
*/
public java.util.List<java.lang.String> getUrls() {
return urls;
}

/** Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs. */
public Search setUrls(java.util.List<java.lang.String> urls) {
this.urls = urls;
return this;
}

@Override
public Search set(String parameterName, Object value) {
return (Search) super.set(parameterName, value);
}
}

}

/**
* Builder for {@link Safebrowsing}.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.safebrowsing.v5.model;

/**
* The response returned after searching threats matching the specified URLs. If nothing is found,
* the server will return an OK status (HTTP status code 200) with the `threats` field empty, rather
* than returning a NOT_FOUND status (HTTP status code 404).
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Safe Browsing API. For a detailed explanation see:
* <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>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleSecuritySafebrowsingV5SearchUrlsResponse extends com.google.api.client.json.GenericJson {

/**
* The client-side cache duration. The client MUST add this duration to the current time to
* determine the expiration time. The expiration time then applies to every URL queried by the
* client in the request, regardless of how many URLs are returned in the response. Even if the
* server returns no matches for a particular URL, this fact MUST also be cached by the client. If
* and only if the field `threats` is empty, the client MAY increase the `cache_duration` to
* determine a new expiration that is later than that specified by the server. In any case, the
* increased cache duration must not be longer than 24 hours. Important: the client MUST NOT
* assume that the server will return the same cache duration for all responses. The server MAY
* choose different cache durations for different responses depending on the situation.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String cacheDuration;

/**
* Unordered list. The unordered list of threat matches found. Each entry contains a URL and the
* threat types that were found matching that URL. The list size can be greater than the number of
* URLs in the request as the all expressions of the URL would've been considered.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<GoogleSecuritySafebrowsingV5ThreatUrl> threats;

/**
* The client-side cache duration. The client MUST add this duration to the current time to
* determine the expiration time. The expiration time then applies to every URL queried by the
* client in the request, regardless of how many URLs are returned in the response. Even if the
* server returns no matches for a particular URL, this fact MUST also be cached by the client. If
* and only if the field `threats` is empty, the client MAY increase the `cache_duration` to
* determine a new expiration that is later than that specified by the server. In any case, the
* increased cache duration must not be longer than 24 hours. Important: the client MUST NOT
* assume that the server will return the same cache duration for all responses. The server MAY
* choose different cache durations for different responses depending on the situation.
* @return value or {@code null} for none
*/
public String getCacheDuration() {
return cacheDuration;
}

/**
* The client-side cache duration. The client MUST add this duration to the current time to
* determine the expiration time. The expiration time then applies to every URL queried by the
* client in the request, regardless of how many URLs are returned in the response. Even if the
* server returns no matches for a particular URL, this fact MUST also be cached by the client. If
* and only if the field `threats` is empty, the client MAY increase the `cache_duration` to
* determine a new expiration that is later than that specified by the server. In any case, the
* increased cache duration must not be longer than 24 hours. Important: the client MUST NOT
* assume that the server will return the same cache duration for all responses. The server MAY
* choose different cache durations for different responses depending on the situation.
* @param cacheDuration cacheDuration or {@code null} for none
*/
public GoogleSecuritySafebrowsingV5SearchUrlsResponse setCacheDuration(String cacheDuration) {
this.cacheDuration = cacheDuration;
return this;
}

/**
* Unordered list. The unordered list of threat matches found. Each entry contains a URL and the
* threat types that were found matching that URL. The list size can be greater than the number of
* URLs in the request as the all expressions of the URL would've been considered.
* @return value or {@code null} for none
*/
public java.util.List<GoogleSecuritySafebrowsingV5ThreatUrl> getThreats() {
return threats;
}

/**
* Unordered list. The unordered list of threat matches found. Each entry contains a URL and the
* threat types that were found matching that URL. The list size can be greater than the number of
* URLs in the request as the all expressions of the URL would've been considered.
* @param threats threats or {@code null} for none
*/
public GoogleSecuritySafebrowsingV5SearchUrlsResponse setThreats(java.util.List<GoogleSecuritySafebrowsingV5ThreatUrl> threats) {
this.threats = threats;
return this;
}

@Override
public GoogleSecuritySafebrowsingV5SearchUrlsResponse set(String fieldName, Object value) {
return (GoogleSecuritySafebrowsingV5SearchUrlsResponse) super.set(fieldName, value);
}

@Override
public GoogleSecuritySafebrowsingV5SearchUrlsResponse clone() {
return (GoogleSecuritySafebrowsingV5SearchUrlsResponse) super.clone();
}

}
Loading