diff --git a/discovery/safebrowsing-v4.json b/discovery/safebrowsing-v4.json index 8eef9677a5d..e4c6c7ef43a 100644 --- a/discovery/safebrowsing-v4.json +++ b/discovery/safebrowsing-v4.json @@ -6,6 +6,7 @@ "description": "Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/safe-browsing/", + "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" @@ -126,7 +127,7 @@ }, "path": "v4/encodedFullHashes/{encodedRequest}", "response": { - "$ref": "FindFullHashesResponse" + "$ref": "GoogleSecuritySafebrowsingV4FindFullHashesResponse" } } } @@ -162,7 +163,7 @@ }, "path": "v4/encodedUpdates/{encodedRequest}", "response": { - "$ref": "FetchThreatListUpdatesResponse" + "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse" } } } @@ -178,10 +179,10 @@ "parameters": {}, "path": "v4/fullHashes:find", "request": { - "$ref": "FindFullHashesRequest" + "$ref": "GoogleSecuritySafebrowsingV4FindFullHashesRequest" }, "response": { - "$ref": "FindFullHashesResponse" + "$ref": "GoogleSecuritySafebrowsingV4FindFullHashesResponse" } } } @@ -197,10 +198,10 @@ "parameters": {}, "path": "v4/threatHits", "request": { - "$ref": "ThreatHit" + "$ref": "GoogleSecuritySafebrowsingV4ThreatHit" }, "response": { - "$ref": "Empty" + "$ref": "GoogleProtobufEmpty" } } } @@ -216,10 +217,10 @@ "parameters": {}, "path": "v4/threatListUpdates:fetch", "request": { - "$ref": "FetchThreatListUpdatesRequest" + "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest" }, "response": { - "$ref": "FetchThreatListUpdatesResponse" + "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse" } } } @@ -235,7 +236,7 @@ "parameters": {}, "path": "v4/threatLists", "response": { - "$ref": "ListThreatListsResponse" + "$ref": "GoogleSecuritySafebrowsingV4ListThreatListsResponse" } } } @@ -251,21 +252,27 @@ "parameters": {}, "path": "v4/threatMatches:find", "request": { - "$ref": "FindThreatMatchesRequest" + "$ref": "GoogleSecuritySafebrowsingV4FindThreatMatchesRequest" }, "response": { - "$ref": "FindThreatMatchesResponse" + "$ref": "GoogleSecuritySafebrowsingV4FindThreatMatchesResponse" } } } } }, - "revision": "20200927", + "revision": "20210303", "rootUrl": "https://safebrowsing.googleapis.com/", "schemas": { - "Checksum": { + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4Checksum": { "description": "The expected state of a client's local database.", - "id": "Checksum", + "id": "GoogleSecuritySafebrowsingV4Checksum", "properties": { "sha256": { "description": "The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database.", @@ -275,9 +282,9 @@ }, "type": "object" }, - "ClientInfo": { + "GoogleSecuritySafebrowsingV4ClientInfo": { "description": "The client metadata associated with Safe Browsing API requests.", - "id": "ClientInfo", + "id": "GoogleSecuritySafebrowsingV4ClientInfo", "properties": { "clientId": { "description": "A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.", @@ -290,191 +297,30 @@ }, "type": "object" }, - "Constraints": { - "description": "The constraints for this update.", - "id": "Constraints", - "properties": { - "deviceLocation": { - "description": "A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.", - "type": "string" - }, - "language": { - "description": "Requests the lists for a specific language. Expects ISO 639 alpha-2 format.", - "type": "string" - }, - "maxDatabaseEntries": { - "description": "Sets the maximum number of entries that the client is willing to have in the local database for the specified list. This should be a power of 2 between 2**10 and 2**20. If zero, no database size limit is set.", - "format": "int32", - "type": "integer" - }, - "maxUpdateEntries": { - "description": "The maximum size in number of entries. The update will not contain more entries than this value. This should be a power of 2 between 2**10 and 2**20. If zero, no update size limit is set.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "Requests the list for a specific geographic location. If not set the server may pick that value based on the user's IP address. Expects ISO 3166-1 alpha-2 format.", - "type": "string" - }, - "supportedCompressions": { - "description": "The compression types supported by the client.", - "items": { - "enum": [ - "COMPRESSION_TYPE_UNSPECIFIED", - "RAW", - "RICE" - ], - "enumDescriptions": [ - "Unknown.", - "Raw, uncompressed data.", - "Rice-Golomb encoded data." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", - "id": "Empty", - "properties": {}, - "type": "object" - }, - "FetchThreatListUpdatesRequest": { - "description": "Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. NOTE: Field index 2 is unused. NEXT: 5", - "id": "FetchThreatListUpdatesRequest", + "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest": { + "description": "Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. The server may not respond to all requests, if the server has no updates for that list. NOTE: Field index 2 is unused. NEXT: 5", + "id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest", "properties": { "client": { - "$ref": "ClientInfo", + "$ref": "GoogleSecuritySafebrowsingV4ClientInfo", "description": "The client metadata." }, "listUpdateRequests": { "description": "The requested threat list updates.", "items": { - "$ref": "ListUpdateRequest" - }, - "type": "array" - } - }, - "type": "object" - }, - "FetchThreatListUpdatesResponse": { - "id": "FetchThreatListUpdatesResponse", - "properties": { - "listUpdateResponses": { - "description": "The list updates requested by the clients.", - "items": { - "$ref": "ListUpdateResponse" - }, - "type": "array" - }, - "minimumWaitDuration": { - "description": "The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "FindFullHashesRequest": { - "description": "Request to return full hashes matched by the provided hash prefixes.", - "id": "FindFullHashesRequest", - "properties": { - "apiClient": { - "$ref": "ClientInfo", - "description": "Client metadata associated with callers of higher-level APIs built on top of the client's implementation." - }, - "client": { - "$ref": "ClientInfo", - "description": "The client metadata." - }, - "clientStates": { - "description": "The current client states for each of the client's local threat lists.", - "items": { - "format": "byte", - "type": "string" + "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest" }, "type": "array" - }, - "threatInfo": { - "$ref": "ThreatInfo", - "description": "The lists and hashes to be checked." } }, "type": "object" }, - "FindFullHashesResponse": { - "id": "FindFullHashesResponse", - "properties": { - "matches": { - "description": "The full hashes that matched the requested prefixes.", - "items": { - "$ref": "ThreatMatch" - }, - "type": "array" - }, - "minimumWaitDuration": { - "description": "The minimum duration the client must wait before issuing any find hashes request. If this field is not set, clients can issue a request as soon as they want.", - "format": "google-duration", - "type": "string" - }, - "negativeCacheDuration": { - "description": "For requested entities that did not match the threat list, how long to cache the response.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "FindThreatMatchesRequest": { - "description": "Request to check entries against lists.", - "id": "FindThreatMatchesRequest", - "properties": { - "client": { - "$ref": "ClientInfo", - "description": "The client metadata." - }, - "threatInfo": { - "$ref": "ThreatInfo", - "description": "The lists and entries to be checked for matches." - } - }, - "type": "object" - }, - "FindThreatMatchesResponse": { - "id": "FindThreatMatchesResponse", - "properties": { - "matches": { - "description": "The threat list matches.", - "items": { - "$ref": "ThreatMatch" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListThreatListsResponse": { - "id": "ListThreatListsResponse", - "properties": { - "threatLists": { - "description": "The lists available for download by the client.", - "items": { - "$ref": "ThreatListDescriptor" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListUpdateRequest": { + "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest": { "description": "A single list update request.", - "id": "ListUpdateRequest", + "id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest", "properties": { "constraints": { - "$ref": "Constraints", + "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints", "description": "The constraints associated with this request." }, "platformType": { @@ -575,19 +421,83 @@ }, "type": "object" }, - "ListUpdateResponse": { + "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints": { + "description": "The constraints for this update.", + "id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints", + "properties": { + "deviceLocation": { + "description": "A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.", + "type": "string" + }, + "language": { + "description": "Requests the lists for a specific language. Expects ISO 639 alpha-2 format.", + "type": "string" + }, + "maxDatabaseEntries": { + "description": "Sets the maximum number of entries that the client is willing to have in the local database for the specified list. This should be a power of 2 between 2**10 and 2**20. If zero, no database size limit is set.", + "format": "int32", + "type": "integer" + }, + "maxUpdateEntries": { + "description": "The maximum size in number of entries. The update will not contain more entries than this value. This should be a power of 2 between 2**10 and 2**20. If zero, no update size limit is set.", + "format": "int32", + "type": "integer" + }, + "region": { + "description": "Requests the list for a specific geographic location. If not set the server may pick that value based on the user's IP address. Expects ISO 3166-1 alpha-2 format.", + "type": "string" + }, + "supportedCompressions": { + "description": "The compression types supported by the client.", + "items": { + "enum": [ + "COMPRESSION_TYPE_UNSPECIFIED", + "RAW", + "RICE" + ], + "enumDescriptions": [ + "Unknown.", + "Raw, uncompressed data.", + "Rice-Golomb encoded data." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse": { + "id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse", + "properties": { + "listUpdateResponses": { + "description": "The list updates requested by the clients. The number of responses here may be less than the number of requests sent by clients. This is the case, for example, if the server has no updates for a particular list.", + "items": { + "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse" + }, + "type": "array" + }, + "minimumWaitDuration": { + "description": "The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse": { "description": "An update to an individual list.", - "id": "ListUpdateResponse", + "id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse", "properties": { "additions": { "description": "A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response.", "items": { - "$ref": "ThreatEntrySet" + "$ref": "GoogleSecuritySafebrowsingV4ThreatEntrySet" }, "type": "array" }, "checksum": { - "$ref": "Checksum", + "$ref": "GoogleSecuritySafebrowsingV4Checksum", "description": "The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later." }, "newClientState": { @@ -624,7 +534,7 @@ "removals": { "description": "A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet.", "items": { - "$ref": "ThreatEntrySet" + "$ref": "GoogleSecuritySafebrowsingV4ThreatEntrySet" }, "type": "array" }, @@ -709,26 +619,100 @@ }, "type": "object" }, - "MetadataEntry": { - "description": "A single metadata entry.", - "id": "MetadataEntry", + "GoogleSecuritySafebrowsingV4FindFullHashesRequest": { + "description": "Request to return full hashes matched by the provided hash prefixes.", + "id": "GoogleSecuritySafebrowsingV4FindFullHashesRequest", "properties": { - "key": { - "description": "The metadata entry key. For JSON requests, the key is base64-encoded.", - "format": "byte", + "apiClient": { + "$ref": "GoogleSecuritySafebrowsingV4ClientInfo", + "description": "Client metadata associated with callers of higher-level APIs built on top of the client's implementation." + }, + "client": { + "$ref": "GoogleSecuritySafebrowsingV4ClientInfo", + "description": "The client metadata." + }, + "clientStates": { + "description": "The current client states for each of the client's local threat lists.", + "items": { + "format": "byte", + "type": "string" + }, + "type": "array" + }, + "threatInfo": { + "$ref": "GoogleSecuritySafebrowsingV4ThreatInfo", + "description": "The lists and hashes to be checked." + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4FindFullHashesResponse": { + "id": "GoogleSecuritySafebrowsingV4FindFullHashesResponse", + "properties": { + "matches": { + "description": "The full hashes that matched the requested prefixes.", + "items": { + "$ref": "GoogleSecuritySafebrowsingV4ThreatMatch" + }, + "type": "array" + }, + "minimumWaitDuration": { + "description": "The minimum duration the client must wait before issuing any find hashes request. If this field is not set, clients can issue a request as soon as they want.", + "format": "google-duration", "type": "string" }, - "value": { - "description": "The metadata entry value. For JSON requests, the value is base64-encoded.", - "format": "byte", + "negativeCacheDuration": { + "description": "For requested entities that did not match the threat list, how long to cache the response.", + "format": "google-duration", "type": "string" } }, "type": "object" }, - "RawHashes": { + "GoogleSecuritySafebrowsingV4FindThreatMatchesRequest": { + "description": "Request to check entries against lists.", + "id": "GoogleSecuritySafebrowsingV4FindThreatMatchesRequest", + "properties": { + "client": { + "$ref": "GoogleSecuritySafebrowsingV4ClientInfo", + "description": "The client metadata." + }, + "threatInfo": { + "$ref": "GoogleSecuritySafebrowsingV4ThreatInfo", + "description": "The lists and entries to be checked for matches." + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4FindThreatMatchesResponse": { + "id": "GoogleSecuritySafebrowsingV4FindThreatMatchesResponse", + "properties": { + "matches": { + "description": "The threat list matches.", + "items": { + "$ref": "GoogleSecuritySafebrowsingV4ThreatMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4ListThreatListsResponse": { + "id": "GoogleSecuritySafebrowsingV4ListThreatListsResponse", + "properties": { + "threatLists": { + "description": "The lists available for download by the client.", + "items": { + "$ref": "GoogleSecuritySafebrowsingV4ThreatListDescriptor" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4RawHashes": { "description": "The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.", - "id": "RawHashes", + "id": "GoogleSecuritySafebrowsingV4RawHashes", "properties": { "prefixSize": { "description": "The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).", @@ -743,9 +727,9 @@ }, "type": "object" }, - "RawIndices": { + "GoogleSecuritySafebrowsingV4RawIndices": { "description": "A set of raw indices to remove from a local list.", - "id": "RawIndices", + "id": "GoogleSecuritySafebrowsingV4RawIndices", "properties": { "indices": { "description": "The indices to remove from a lexicographically-sorted local list.", @@ -758,9 +742,9 @@ }, "type": "object" }, - "RiceDeltaEncoding": { + "GoogleSecuritySafebrowsingV4RiceDeltaEncoding": { "description": "The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.", - "id": "RiceDeltaEncoding", + "id": "GoogleSecuritySafebrowsingV4RiceDeltaEncoding", "properties": { "encodedData": { "description": "The encoded deltas that are encoded using the Golomb-Rice coder.", @@ -785,9 +769,9 @@ }, "type": "object" }, - "ThreatEntry": { + "GoogleSecuritySafebrowsingV4ThreatEntry": { "description": "An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set.", - "id": "ThreatEntry", + "id": "GoogleSecuritySafebrowsingV4ThreatEntry", "properties": { "digest": { "description": "The digest of an executable in SHA256 format. The API supports both binary and hex digests. For JSON requests, digests are base64-encoded.", @@ -806,23 +790,40 @@ }, "type": "object" }, - "ThreatEntryMetadata": { + "GoogleSecuritySafebrowsingV4ThreatEntryMetadata": { "description": "The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type.", - "id": "ThreatEntryMetadata", + "id": "GoogleSecuritySafebrowsingV4ThreatEntryMetadata", "properties": { "entries": { "description": "The metadata entries.", "items": { - "$ref": "MetadataEntry" + "$ref": "GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry" }, "type": "array" } }, "type": "object" }, - "ThreatEntrySet": { + "GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry": { + "description": "A single metadata entry.", + "id": "GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry", + "properties": { + "key": { + "description": "The metadata entry key. For JSON requests, the key is base64-encoded.", + "format": "byte", + "type": "string" + }, + "value": { + "description": "The metadata entry value. For JSON requests, the value is base64-encoded.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4ThreatEntrySet": { "description": "A set of threats that should be added or removed from a client's local database.", - "id": "ThreatEntrySet", + "id": "GoogleSecuritySafebrowsingV4ThreatEntrySet", "properties": { "compressionType": { "description": "The compression type for the entries in this set.", @@ -839,33 +840,33 @@ "type": "string" }, "rawHashes": { - "$ref": "RawHashes", + "$ref": "GoogleSecuritySafebrowsingV4RawHashes", "description": "The raw SHA256-formatted entries." }, "rawIndices": { - "$ref": "RawIndices", + "$ref": "GoogleSecuritySafebrowsingV4RawIndices", "description": "The raw removal indices for a local list." }, "riceHashes": { - "$ref": "RiceDeltaEncoding", + "$ref": "GoogleSecuritySafebrowsingV4RiceDeltaEncoding", "description": "The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data." }, "riceIndices": { - "$ref": "RiceDeltaEncoding", + "$ref": "GoogleSecuritySafebrowsingV4RiceDeltaEncoding", "description": "The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data." } }, "type": "object" }, - "ThreatHit": { - "id": "ThreatHit", + "GoogleSecuritySafebrowsingV4ThreatHit": { + "id": "GoogleSecuritySafebrowsingV4ThreatHit", "properties": { "clientInfo": { - "$ref": "ClientInfo", + "$ref": "GoogleSecuritySafebrowsingV4ClientInfo", "description": "Client-reported identification." }, "entry": { - "$ref": "ThreatEntry", + "$ref": "GoogleSecuritySafebrowsingV4ThreatEntry", "description": "The threat entry responsible for the hit. Full hash should be reported for hash-based hits." }, "platformType": { @@ -897,7 +898,7 @@ "resources": { "description": "The resources related to the threat hit.", "items": { - "$ref": "ThreatSource" + "$ref": "GoogleSecuritySafebrowsingV4ThreatHitThreatSource" }, "type": "array" }, @@ -944,15 +945,68 @@ "type": "string" }, "userInfo": { - "$ref": "UserInfo", + "$ref": "GoogleSecuritySafebrowsingV4ThreatHitUserInfo", "description": "Details about the user that encountered the threat." } }, "type": "object" }, - "ThreatInfo": { + "GoogleSecuritySafebrowsingV4ThreatHitThreatSource": { + "description": "A single resource related to a threat hit.", + "id": "GoogleSecuritySafebrowsingV4ThreatHitThreatSource", + "properties": { + "referrer": { + "description": "Referrer of the resource. Only set if the referrer is available.", + "type": "string" + }, + "remoteIp": { + "description": "The remote IP of the resource in ASCII format. Either IPv4 or IPv6.", + "type": "string" + }, + "type": { + "description": "The type of source reported.", + "enum": [ + "THREAT_SOURCE_TYPE_UNSPECIFIED", + "MATCHING_URL", + "TAB_URL", + "TAB_REDIRECT", + "TAB_RESOURCE" + ], + "enumDescriptions": [ + "Unknown.", + "The URL that matched the threat list (for which GetFullHash returned a valid hash).", + "The final top-level URL of the tab that the client was browsing when the match occurred.", + "A redirect URL that was fetched before hitting the final TAB_URL.", + "A resource loaded within the final TAB_URL." + ], + "type": "string" + }, + "url": { + "description": "The URL of the resource.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4ThreatHitUserInfo": { + "description": "Details about the user that encountered the threat.", + "id": "GoogleSecuritySafebrowsingV4ThreatHitUserInfo", + "properties": { + "regionCode": { + "description": "The UN M.49 region code associated with the user's location.", + "type": "string" + }, + "userId": { + "description": "Unique user identifier defined by the client.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "GoogleSecuritySafebrowsingV4ThreatInfo": { "description": "The information regarding one or more threats that a client submits when checking for matches in threat lists.", - "id": "ThreatInfo", + "id": "GoogleSecuritySafebrowsingV4ThreatInfo", "properties": { "platformTypes": { "description": "The platform types to be checked.", @@ -986,7 +1040,7 @@ "threatEntries": { "description": "The threat entries to be checked.", "items": { - "$ref": "ThreatEntry" + "$ref": "GoogleSecuritySafebrowsingV4ThreatEntry" }, "type": "array" }, @@ -1063,9 +1117,9 @@ }, "type": "object" }, - "ThreatListDescriptor": { + "GoogleSecuritySafebrowsingV4ThreatListDescriptor": { "description": "Describes an individual threat list. A list is defined by three parameters: the type of threat posed, the type of platform targeted by the threat, and the type of entries in the list.", - "id": "ThreatListDescriptor", + "id": "GoogleSecuritySafebrowsingV4ThreatListDescriptor", "properties": { "platformType": { "description": "The platform type targeted by the list's entries.", @@ -1160,9 +1214,9 @@ }, "type": "object" }, - "ThreatMatch": { + "GoogleSecuritySafebrowsingV4ThreatMatch": { "description": "A match when checking a threat entry in the Safe Browsing threat lists.", - "id": "ThreatMatch", + "id": "GoogleSecuritySafebrowsingV4ThreatMatch", "properties": { "cacheDuration": { "description": "The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives.", @@ -1196,11 +1250,11 @@ "type": "string" }, "threat": { - "$ref": "ThreatEntry", + "$ref": "GoogleSecuritySafebrowsingV4ThreatEntry", "description": "The threat matching this threat." }, "threatEntryMetadata": { - "$ref": "ThreatEntryMetadata", + "$ref": "GoogleSecuritySafebrowsingV4ThreatEntryMetadata", "description": "Optional metadata associated with this threat." }, "threatEntryType": { @@ -1269,59 +1323,6 @@ } }, "type": "object" - }, - "ThreatSource": { - "description": "A single resource related to a threat hit.", - "id": "ThreatSource", - "properties": { - "referrer": { - "description": "Referrer of the resource. Only set if the referrer is available.", - "type": "string" - }, - "remoteIp": { - "description": "The remote IP of the resource in ASCII format. Either IPv4 or IPv6.", - "type": "string" - }, - "type": { - "description": "The type of source reported.", - "enum": [ - "THREAT_SOURCE_TYPE_UNSPECIFIED", - "MATCHING_URL", - "TAB_URL", - "TAB_REDIRECT", - "TAB_RESOURCE" - ], - "enumDescriptions": [ - "Unknown.", - "The URL that matched the threat list (for which GetFullHash returned a valid hash).", - "The final top-level URL of the tab that the client was browsing when the match occurred.", - "A redirect URL that was fetched before hitting the final TAB_URL.", - "A resource loaded within the final TAB_URL." - ], - "type": "string" - }, - "url": { - "description": "The URL of the resource.", - "type": "string" - } - }, - "type": "object" - }, - "UserInfo": { - "description": "Details about the user that encountered the threat.", - "id": "UserInfo", - "properties": { - "regionCode": { - "description": "The UN M.49 region code associated with the user's location.", - "type": "string" - }, - "userId": { - "description": "Unique user identifier defined by the client.", - "format": "byte", - "type": "string" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/src/apis/safebrowsing/v4.ts b/src/apis/safebrowsing/v4.ts index f2e1db3de5e..cfbf13b741f 100644 --- a/src/apis/safebrowsing/v4.ts +++ b/src/apis/safebrowsing/v4.ts @@ -137,10 +137,14 @@ export namespace safebrowsing_v4 { } } + /** + * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$GoogleProtobufEmpty {} /** * The expected state of a client's local database. */ - export interface Schema$Checksum { + export interface Schema$GoogleSecuritySafebrowsingV4Checksum { /** * The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database. */ @@ -149,7 +153,7 @@ export namespace safebrowsing_v4 { /** * The client metadata associated with Safe Browsing API requests. */ - export interface Schema$ClientInfo { + export interface Schema$GoogleSecuritySafebrowsingV4ClientInfo { /** * A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API. */ @@ -159,10 +163,48 @@ export namespace safebrowsing_v4 { */ clientVersion?: string | null; } + /** + * Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. The server may not respond to all requests, if the server has no updates for that list. NOTE: Field index 2 is unused. NEXT: 5 + */ + export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest { + /** + * The client metadata. + */ + client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo; + /** + * The requested threat list updates. + */ + listUpdateRequests?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest[]; + } + /** + * A single list update request. + */ + export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest { + /** + * The constraints associated with this request. + */ + constraints?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints; + /** + * The type of platform at risk by entries present in the list. + */ + platformType?: string | null; + /** + * The current state of the client for the requested list (the encrypted client state that was received from the last successful list update). + */ + state?: string | null; + /** + * The types of entries present in the list. + */ + threatEntryType?: string | null; + /** + * The type of threat posed by entries present in the list. + */ + threatType?: string | null; + } /** * The constraints for this update. */ - export interface Schema$Constraints { + export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints { /** * A client's physical location, expressed as a ISO 31166-1 alpha-2 region code. */ @@ -188,45 +230,65 @@ export namespace safebrowsing_v4 { */ supportedCompressions?: string[] | null; } + export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse { + /** + * The list updates requested by the clients. The number of responses here may be less than the number of requests sent by clients. This is the case, for example, if the server has no updates for a particular list. + */ + listUpdateResponses?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse[]; + /** + * The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want. + */ + minimumWaitDuration?: string | null; + } /** - * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`. - */ - export interface Schema$Empty {} - /** - * Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. NOTE: Field index 2 is unused. NEXT: 5 + * An update to an individual list. */ - export interface Schema$FetchThreatListUpdatesRequest { + export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse { /** - * The client metadata. + * A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response. */ - client?: Schema$ClientInfo; + additions?: Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet[]; /** - * The requested threat list updates. + * The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later. */ - listUpdateRequests?: Schema$ListUpdateRequest[]; - } - export interface Schema$FetchThreatListUpdatesResponse { + checksum?: Schema$GoogleSecuritySafebrowsingV4Checksum; /** - * The list updates requested by the clients. + * The new client state, in encrypted format. Opaque to clients. */ - listUpdateResponses?: Schema$ListUpdateResponse[]; + newClientState?: string | null; /** - * The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want. + * The platform type for which data is returned. */ - minimumWaitDuration?: string | null; + platformType?: string | null; + /** + * A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet. + */ + removals?: Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet[]; + /** + * The type of response. This may indicate that an action is required by the client when the response is received. + */ + responseType?: string | null; + /** + * The format of the threats. + */ + threatEntryType?: string | null; + /** + * The threat type for which data is returned. + */ + threatType?: string | null; } /** * Request to return full hashes matched by the provided hash prefixes. */ - export interface Schema$FindFullHashesRequest { + export interface Schema$GoogleSecuritySafebrowsingV4FindFullHashesRequest { /** * Client metadata associated with callers of higher-level APIs built on top of the client's implementation. */ - apiClient?: Schema$ClientInfo; + apiClient?: Schema$GoogleSecuritySafebrowsingV4ClientInfo; /** * The client metadata. */ - client?: Schema$ClientInfo; + client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo; /** * The current client states for each of the client's local threat lists. */ @@ -234,13 +296,13 @@ export namespace safebrowsing_v4 { /** * The lists and hashes to be checked. */ - threatInfo?: Schema$ThreatInfo; + threatInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatInfo; } - export interface Schema$FindFullHashesResponse { + export interface Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse { /** * The full hashes that matched the requested prefixes. */ - matches?: Schema$ThreatMatch[]; + matches?: Schema$GoogleSecuritySafebrowsingV4ThreatMatch[]; /** * The minimum duration the client must wait before issuing any find hashes request. If this field is not set, clients can issue a request as soon as they want. */ @@ -253,107 +315,32 @@ export namespace safebrowsing_v4 { /** * Request to check entries against lists. */ - export interface Schema$FindThreatMatchesRequest { + export interface Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesRequest { /** * The client metadata. */ - client?: Schema$ClientInfo; + client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo; /** * The lists and entries to be checked for matches. */ - threatInfo?: Schema$ThreatInfo; + threatInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatInfo; } - export interface Schema$FindThreatMatchesResponse { + export interface Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse { /** * The threat list matches. */ - matches?: Schema$ThreatMatch[]; + matches?: Schema$GoogleSecuritySafebrowsingV4ThreatMatch[]; } - export interface Schema$ListThreatListsResponse { + export interface Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse { /** * The lists available for download by the client. */ - threatLists?: Schema$ThreatListDescriptor[]; - } - /** - * A single list update request. - */ - export interface Schema$ListUpdateRequest { - /** - * The constraints associated with this request. - */ - constraints?: Schema$Constraints; - /** - * The type of platform at risk by entries present in the list. - */ - platformType?: string | null; - /** - * The current state of the client for the requested list (the encrypted client state that was received from the last successful list update). - */ - state?: string | null; - /** - * The types of entries present in the list. - */ - threatEntryType?: string | null; - /** - * The type of threat posed by entries present in the list. - */ - threatType?: string | null; - } - /** - * An update to an individual list. - */ - export interface Schema$ListUpdateResponse { - /** - * A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response. - */ - additions?: Schema$ThreatEntrySet[]; - /** - * The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later. - */ - checksum?: Schema$Checksum; - /** - * The new client state, in encrypted format. Opaque to clients. - */ - newClientState?: string | null; - /** - * The platform type for which data is returned. - */ - platformType?: string | null; - /** - * A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet. - */ - removals?: Schema$ThreatEntrySet[]; - /** - * The type of response. This may indicate that an action is required by the client when the response is received. - */ - responseType?: string | null; - /** - * The format of the threats. - */ - threatEntryType?: string | null; - /** - * The threat type for which data is returned. - */ - threatType?: string | null; - } - /** - * A single metadata entry. - */ - export interface Schema$MetadataEntry { - /** - * The metadata entry key. For JSON requests, the key is base64-encoded. - */ - key?: string | null; - /** - * The metadata entry value. For JSON requests, the value is base64-encoded. - */ - value?: string | null; + threatLists?: Schema$GoogleSecuritySafebrowsingV4ThreatListDescriptor[]; } /** * The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression. */ - export interface Schema$RawHashes { + export interface Schema$GoogleSecuritySafebrowsingV4RawHashes { /** * The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). */ @@ -366,7 +353,7 @@ export namespace safebrowsing_v4 { /** * A set of raw indices to remove from a local list. */ - export interface Schema$RawIndices { + export interface Schema$GoogleSecuritySafebrowsingV4RawIndices { /** * The indices to remove from a lexicographically-sorted local list. */ @@ -375,7 +362,7 @@ export namespace safebrowsing_v4 { /** * The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices. */ - export interface Schema$RiceDeltaEncoding { + export interface Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding { /** * The encoded deltas that are encoded using the Golomb-Rice coder. */ @@ -396,7 +383,7 @@ export namespace safebrowsing_v4 { /** * An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set. */ - export interface Schema$ThreatEntry { + export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntry { /** * The digest of an executable in SHA256 format. The API supports both binary and hex digests. For JSON requests, digests are base64-encoded. */ @@ -413,16 +400,29 @@ export namespace safebrowsing_v4 { /** * The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type. */ - export interface Schema$ThreatEntryMetadata { + export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadata { /** * The metadata entries. */ - entries?: Schema$MetadataEntry[]; + entries?: Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry[]; + } + /** + * A single metadata entry. + */ + export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry { + /** + * The metadata entry key. For JSON requests, the key is base64-encoded. + */ + key?: string | null; + /** + * The metadata entry value. For JSON requests, the value is base64-encoded. + */ + value?: string | null; } /** * A set of threats that should be added or removed from a client's local database. */ - export interface Schema$ThreatEntrySet { + export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet { /** * The compression type for the entries in this set. */ @@ -430,29 +430,29 @@ export namespace safebrowsing_v4 { /** * The raw SHA256-formatted entries. */ - rawHashes?: Schema$RawHashes; + rawHashes?: Schema$GoogleSecuritySafebrowsingV4RawHashes; /** * The raw removal indices for a local list. */ - rawIndices?: Schema$RawIndices; + rawIndices?: Schema$GoogleSecuritySafebrowsingV4RawIndices; /** * The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data. */ - riceHashes?: Schema$RiceDeltaEncoding; + riceHashes?: Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding; /** * The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data. */ - riceIndices?: Schema$RiceDeltaEncoding; + riceIndices?: Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding; } - export interface Schema$ThreatHit { + export interface Schema$GoogleSecuritySafebrowsingV4ThreatHit { /** * Client-reported identification. */ - clientInfo?: Schema$ClientInfo; + clientInfo?: Schema$GoogleSecuritySafebrowsingV4ClientInfo; /** * The threat entry responsible for the hit. Full hash should be reported for hash-based hits. */ - entry?: Schema$ThreatEntry; + entry?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry; /** * The platform type reported. */ @@ -460,7 +460,7 @@ export namespace safebrowsing_v4 { /** * The resources related to the threat hit. */ - resources?: Schema$ThreatSource[]; + resources?: Schema$GoogleSecuritySafebrowsingV4ThreatHitThreatSource[]; /** * The threat type reported. */ @@ -468,12 +468,46 @@ export namespace safebrowsing_v4 { /** * Details about the user that encountered the threat. */ - userInfo?: Schema$UserInfo; + userInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatHitUserInfo; + } + /** + * A single resource related to a threat hit. + */ + export interface Schema$GoogleSecuritySafebrowsingV4ThreatHitThreatSource { + /** + * Referrer of the resource. Only set if the referrer is available. + */ + referrer?: string | null; + /** + * The remote IP of the resource in ASCII format. Either IPv4 or IPv6. + */ + remoteIp?: string | null; + /** + * The type of source reported. + */ + type?: string | null; + /** + * The URL of the resource. + */ + url?: string | null; + } + /** + * Details about the user that encountered the threat. + */ + export interface Schema$GoogleSecuritySafebrowsingV4ThreatHitUserInfo { + /** + * The UN M.49 region code associated with the user's location. + */ + regionCode?: string | null; + /** + * Unique user identifier defined by the client. + */ + userId?: string | null; } /** * The information regarding one or more threats that a client submits when checking for matches in threat lists. */ - export interface Schema$ThreatInfo { + export interface Schema$GoogleSecuritySafebrowsingV4ThreatInfo { /** * The platform types to be checked. */ @@ -481,7 +515,7 @@ export namespace safebrowsing_v4 { /** * The threat entries to be checked. */ - threatEntries?: Schema$ThreatEntry[]; + threatEntries?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry[]; /** * The entry types to be checked. */ @@ -494,7 +528,7 @@ export namespace safebrowsing_v4 { /** * Describes an individual threat list. A list is defined by three parameters: the type of threat posed, the type of platform targeted by the threat, and the type of entries in the list. */ - export interface Schema$ThreatListDescriptor { + export interface Schema$GoogleSecuritySafebrowsingV4ThreatListDescriptor { /** * The platform type targeted by the list's entries. */ @@ -511,7 +545,7 @@ export namespace safebrowsing_v4 { /** * A match when checking a threat entry in the Safe Browsing threat lists. */ - export interface Schema$ThreatMatch { + export interface Schema$GoogleSecuritySafebrowsingV4ThreatMatch { /** * The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives. */ @@ -523,11 +557,11 @@ export namespace safebrowsing_v4 { /** * The threat matching this threat. */ - threat?: Schema$ThreatEntry; + threat?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry; /** * Optional metadata associated with this threat. */ - threatEntryMetadata?: Schema$ThreatEntryMetadata; + threatEntryMetadata?: Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadata; /** * The threat entry type matching this threat. */ @@ -537,40 +571,6 @@ export namespace safebrowsing_v4 { */ threatType?: string | null; } - /** - * A single resource related to a threat hit. - */ - export interface Schema$ThreatSource { - /** - * Referrer of the resource. Only set if the referrer is available. - */ - referrer?: string | null; - /** - * The remote IP of the resource in ASCII format. Either IPv4 or IPv6. - */ - remoteIp?: string | null; - /** - * The type of source reported. - */ - type?: string | null; - /** - * The URL of the resource. - */ - url?: string | null; - } - /** - * Details about the user that encountered the threat. - */ - export interface Schema$UserInfo { - /** - * The UN M.49 region code associated with the user's location. - */ - regionCode?: string | null; - /** - * Unique user identifier defined by the client. - */ - userId?: string | null; - } export class Resource$Encodedfullhashes { context: APIRequestContext; @@ -640,7 +640,7 @@ export namespace safebrowsing_v4 { get( params?: Params$Resource$Encodedfullhashes$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( params: Params$Resource$Encodedfullhashes$Get, options: StreamMethodOptions | BodyResponseCallback, @@ -650,30 +650,32 @@ export namespace safebrowsing_v4 { params: Params$Resource$Encodedfullhashes$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( params: Params$Resource$Encodedfullhashes$Get, - callback: BodyResponseCallback + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; get( paramsOrCallback?: | Params$Resource$Encodedfullhashes$Get - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Encodedfullhashes$Get; @@ -708,12 +710,14 @@ export namespace safebrowsing_v4 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } } @@ -801,7 +805,7 @@ export namespace safebrowsing_v4 { get( params?: Params$Resource$Encodedupdates$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( params: Params$Resource$Encodedupdates$Get, options: StreamMethodOptions | BodyResponseCallback, @@ -811,32 +815,32 @@ export namespace safebrowsing_v4 { params: Params$Resource$Encodedupdates$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( params: Params$Resource$Encodedupdates$Get, - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; get( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; get( paramsOrCallback?: | Params$Resource$Encodedupdates$Get - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Encodedupdates$Get; @@ -871,12 +875,12 @@ export namespace safebrowsing_v4 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } @@ -972,7 +976,7 @@ export namespace safebrowsing_v4 { find( params?: Params$Resource$Fullhashes$Find, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; find( params: Params$Resource$Fullhashes$Find, options: StreamMethodOptions | BodyResponseCallback, @@ -982,30 +986,32 @@ export namespace safebrowsing_v4 { params: Params$Resource$Fullhashes$Find, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; find( params: Params$Resource$Fullhashes$Find, - callback: BodyResponseCallback + callback: BodyResponseCallback + ): void; + find( + callback: BodyResponseCallback ): void; - find(callback: BodyResponseCallback): void; find( paramsOrCallback?: | Params$Resource$Fullhashes$Find - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Fullhashes$Find; let options = (optionsOrCallback || {}) as MethodOptions; @@ -1039,12 +1045,14 @@ export namespace safebrowsing_v4 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } } @@ -1053,7 +1061,7 @@ export namespace safebrowsing_v4 { /** * Request body metadata */ - requestBody?: Schema$FindFullHashesRequest; + requestBody?: Schema$GoogleSecuritySafebrowsingV4FindFullHashesRequest; } export class Resource$Threathits { @@ -1127,7 +1135,7 @@ export namespace safebrowsing_v4 { create( params?: Params$Resource$Threathits$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( params: Params$Resource$Threathits$Create, options: StreamMethodOptions | BodyResponseCallback, @@ -1135,28 +1143,31 @@ export namespace safebrowsing_v4 { ): void; create( params: Params$Resource$Threathits$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; create( params: Params$Resource$Threathits$Create, - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; create( paramsOrCallback?: | Params$Resource$Threathits$Create - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Threathits$Create; let options = (optionsOrCallback || {}) as MethodOptions; @@ -1187,12 +1198,12 @@ export namespace safebrowsing_v4 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } @@ -1202,7 +1213,7 @@ export namespace safebrowsing_v4 { /** * Request body metadata */ - requestBody?: Schema$ThreatHit; + requestBody?: Schema$GoogleSecuritySafebrowsingV4ThreatHit; } export class Resource$Threatlists { @@ -1265,7 +1276,7 @@ export namespace safebrowsing_v4 { list( params?: Params$Resource$Threatlists$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( params: Params$Resource$Threatlists$List, options: StreamMethodOptions | BodyResponseCallback, @@ -1275,30 +1286,32 @@ export namespace safebrowsing_v4 { params: Params$Resource$Threatlists$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( params: Params$Resource$Threatlists$List, - callback: BodyResponseCallback + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; list( paramsOrCallback?: | Params$Resource$Threatlists$List - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Threatlists$List; let options = (optionsOrCallback || {}) as MethodOptions; @@ -1329,12 +1342,14 @@ export namespace safebrowsing_v4 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } } @@ -1412,7 +1427,7 @@ export namespace safebrowsing_v4 { fetch( params?: Params$Resource$Threatlistupdates$Fetch, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; fetch( params: Params$Resource$Threatlistupdates$Fetch, options: StreamMethodOptions | BodyResponseCallback, @@ -1422,32 +1437,32 @@ export namespace safebrowsing_v4 { params: Params$Resource$Threatlistupdates$Fetch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; fetch( params: Params$Resource$Threatlistupdates$Fetch, - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; fetch( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; fetch( paramsOrCallback?: | Params$Resource$Threatlistupdates$Fetch - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Threatlistupdates$Fetch; @@ -1482,12 +1497,12 @@ export namespace safebrowsing_v4 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } @@ -1499,7 +1514,7 @@ export namespace safebrowsing_v4 { /** * Request body metadata */ - requestBody?: Schema$FetchThreatListUpdatesRequest; + requestBody?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest; } export class Resource$Threatmatches { @@ -1571,7 +1586,7 @@ export namespace safebrowsing_v4 { find( params?: Params$Resource$Threatmatches$Find, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; find( params: Params$Resource$Threatmatches$Find, options: StreamMethodOptions | BodyResponseCallback, @@ -1581,32 +1596,32 @@ export namespace safebrowsing_v4 { params: Params$Resource$Threatmatches$Find, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; find( params: Params$Resource$Threatmatches$Find, - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; find( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; find( paramsOrCallback?: | Params$Resource$Threatmatches$Find - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Threatmatches$Find; @@ -1641,12 +1656,14 @@ export namespace safebrowsing_v4 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } } @@ -1656,6 +1673,6 @@ export namespace safebrowsing_v4 { /** * Request body metadata */ - requestBody?: Schema$FindThreatMatchesRequest; + requestBody?: Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesRequest; } }