Types for Web Risk API Client#
-
class
google.cloud.webrisk_v1beta1.types.
ComputeThreatListDiffRequest
# Describes an API diff request.
-
threat_type
# Required. The ThreatList to update.
-
version_token
# The current version token of the client for the requested list (the client version that was received from the last successful diff).
-
constraints
# The constraints associated with this request.
-
class
Constraints
# The constraints for this diff.
-
max_diff_entries
# The maximum size in number of entries. The diff will not contain more entries than this value. This should be a power of 2 between 210 and 220. If zero, no diff size limit is set.
-
max_database_entries
# Sets the maximum number of entries that the client is willing to have in the local database. This should be a power of 2 between 210 and 220. If zero, no database size limit is set.
-
supported_compressions
# The compression types supported by the client.
-
max_database_entries
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.max_database_entries
-
max_diff_entries
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.max_diff_entries
-
supported_compressions
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.supported_compressions
-
-
constraints
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.constraints
-
threat_type
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.threat_type
-
version_token
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.version_token
-
-
class
google.cloud.webrisk_v1beta1.types.
ComputeThreatListDiffResponse
# -
response_type
# The type of response. This may indicate that an action is required by the client when the response is received.
-
additions
# A set of entries to add to a local threat type’s list.
-
removals
# A set of entries to remove from a local threat type’s list. This field may be empty.
-
new_version_token
# The new opaque client version token.
-
checksum
# 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 diff. If the client state doesn’t match the expected state, the client must disregard this diff and retry later.
-
recommended_next_diff
# The soonest the client should wait before issuing any diff request. Querying sooner is unlikely to produce a meaningful diff. Waiting longer is acceptable considering the use case. If this field is not set clients may update as soon as they want.
-
class
Checksum
# The expected state of a client’s local database.
-
sha256
# The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database.
-
sha256
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.sha256
-
-
additions
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.additions
-
checksum
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.checksum
-
new_version_token
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.new_version_token
-
recommended_next_diff
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.recommended_next_diff
-
removals
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.removals
-
response_type
Field google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.response_type
-
-
class
google.cloud.webrisk_v1beta1.types.
RawHashes
# The uncompressed threat entries in hash format. 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 URI.
Used for sending ThreatEntryAdditons to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.
-
prefix_size
# The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
-
raw_hashes
# The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.
-
prefix_size
Field google.cloud.webrisk.v1beta1.RawHashes.prefix_size
-
raw_hashes
Field google.cloud.webrisk.v1beta1.RawHashes.raw_hashes
-
-
class
google.cloud.webrisk_v1beta1.types.
RawIndices
# A set of raw indices to remove from a local list.
-
indices
# The indices to remove from a lexicographically-sorted local list.
-
indices
Field google.cloud.webrisk.v1beta1.RawIndices.indices
-
-
class
google.cloud.webrisk_v1beta1.types.
RiceDeltaEncoding
# The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.
-
first_value
# The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer’s value. If the field is empty or missing, assume zero.
-
rice_parameter
# The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if
num_entries
is zero.
-
entry_count
# The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in
first_value
.
-
encoded_data
# The encoded deltas that are encoded using the Golomb-Rice coder.
-
encoded_data
Field google.cloud.webrisk.v1beta1.RiceDeltaEncoding.encoded_data
-
entry_count
Field google.cloud.webrisk.v1beta1.RiceDeltaEncoding.entry_count
-
first_value
Field google.cloud.webrisk.v1beta1.RiceDeltaEncoding.first_value
-
rice_parameter
Field google.cloud.webrisk.v1beta1.RiceDeltaEncoding.rice_parameter
-
-
class
google.cloud.webrisk_v1beta1.types.
SearchHashesRequest
# Request to return full hashes matched by the provided hash prefixes.
-
hash_prefix
# A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. For JSON requests, this field is base64-encoded.
-
threat_types
# Required. The ThreatLists to search in.
-
hash_prefix
Field google.cloud.webrisk.v1beta1.SearchHashesRequest.hash_prefix
-
threat_types
Field google.cloud.webrisk.v1beta1.SearchHashesRequest.threat_types
-
-
class
google.cloud.webrisk_v1beta1.types.
SearchHashesResponse
# -
threats
# The full hashes that matched the requested prefixes. The hash will be populated in the key.
-
negative_expire_time
# For requested entities that did not match the threat list, how long to cache the response until.
-
class
ThreatHash
# Contains threat information on a matching hash.
-
threat_types
# The ThreatList this threat belongs to. This must contain at least one entry.
-
hash
# A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.
-
expire_time
# The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.
-
expire_time
Field google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.expire_time
-
hash
Field google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.hash
-
threat_types
Field google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.threat_types
-
-
negative_expire_time
Field google.cloud.webrisk.v1beta1.SearchHashesResponse.negative_expire_time
-
threats
Field google.cloud.webrisk.v1beta1.SearchHashesResponse.threats
-
-
class
google.cloud.webrisk_v1beta1.types.
SearchUrisRequest
# Request to check URI entries against threatLists.
-
uri
# The URI to be checked for matches.
-
threat_types
# Required. The ThreatLists to search in.
-
threat_types
Field google.cloud.webrisk.v1beta1.SearchUrisRequest.threat_types
-
uri
Field google.cloud.webrisk.v1beta1.SearchUrisRequest.uri
-
-
class
google.cloud.webrisk_v1beta1.types.
SearchUrisResponse
# -
threat
# The threat list matches. This may be empty if the URI is on no list.
-
class
ThreatUri
# Contains threat information on a matching uri.
-
threat_types
# The ThreatList this threat belongs to.
-
expire_time
# The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.
-
expire_time
Field google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.expire_time
-
threat_types
Field google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.threat_types
-
-
threat
Field google.cloud.webrisk.v1beta1.SearchUrisResponse.threat
-
-
class
google.cloud.webrisk_v1beta1.types.
ThreatEntryAdditions
# Contains the set of entries to add to a local database. May contain a combination of compressed and raw data in a single response.
-
raw_hashes
# The raw SHA256-formatted entries. Repeated to allow returning sets of hashes with different prefix sizes.
-
rice_hashes
# 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.
-
raw_hashes
Field google.cloud.webrisk.v1beta1.ThreatEntryAdditions.raw_hashes
-
rice_hashes
Field google.cloud.webrisk.v1beta1.ThreatEntryAdditions.rice_hashes
-
-
class
google.cloud.webrisk_v1beta1.types.
ThreatEntryRemovals
# Contains the set of entries to remove from a local database.
-
raw_indices
# The raw removal indices for a local list.
-
rice_indices
# 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.
-
raw_indices
Field google.cloud.webrisk.v1beta1.ThreatEntryRemovals.raw_indices
-
rice_indices
Field google.cloud.webrisk.v1beta1.ThreatEntryRemovals.rice_indices
-