Class: Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5SearchHashesResponse
- Inherits:
-
Object
- Object
- Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5SearchHashesResponse
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/safebrowsing_v5/classes.rb,
lib/google/apis/safebrowsing_v5/representations.rb,
lib/google/apis/safebrowsing_v5/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#cache_duration ⇒ String
The client-side cache duration.
-
#full_hashes ⇒ Array<Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5FullHash>
Unordered list.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleSecuritySafebrowsingV5SearchHashesResponse
constructor
A new instance of GoogleSecuritySafebrowsingV5SearchHashesResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleSecuritySafebrowsingV5SearchHashesResponse
Returns a new instance of GoogleSecuritySafebrowsingV5SearchHashesResponse.
117 118 119 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 117 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cache_duration ⇒ String
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.
Corresponds to the JSON property cacheDuration
110 111 112 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 110 def cache_duration @cache_duration end |
#full_hashes ⇒ Array<Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5FullHash>
Unordered list. The unordered list of full hashes found.
Corresponds to the JSON property fullHashes
115 116 117 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 115 def full_hashes @full_hashes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
122 123 124 125 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 122 def update!(**args) @cache_duration = args[:cache_duration] if args.key?(:cache_duration) @full_hashes = args[:full_hashes] if args.key?(:full_hashes) end |