View Source GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5SearchHashesResponse (google_api_safe_browsing v0.25.0)

The response returned after searching threat hashes. If nothing is found, the server will return an OK status (HTTP status code 200) with the full_hashes field empty, rather than returning a NOT_FOUND status (HTTP status code 404). What's new in V5: There is a separation between FullHash and FullHashDetail. In the case when a hash represents a site having multiple threats (e.g. both MALWARE and SOCIAL_ENGINEERING), the full hash does not need to be sent twice as in V4. Furthermore, the cache duration has been simplified into a single cache_duration field.

Attributes

  • cacheDuration (type: String.t, default: nil) - 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 hash prefix queried by the client in the request, regardless of how many full hashes are returned in the response. Even if the server returns no full hashes for a particular hash prefix, this fact MUST also be cached by the client. 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.
  • fullHashes (type: list(GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHash.t), default: nil) - Unordered list. The unordered list of full hashes found.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() ::
  %GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5SearchHashesResponse{
    cacheDuration: String.t() | nil,
    fullHashes:
      [GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHash.t()]
      | nil
  }

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.