Class: Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5SearchUrlsResponse
- Inherits:
-
Object
- Object
- Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5SearchUrlsResponse
- 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 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).
Instance Attribute Summary collapse
-
#cache_duration ⇒ String
The client-side cache duration.
-
#threats ⇒ Array<Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5ThreatUrl>
Unordered list.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleSecuritySafebrowsingV5SearchUrlsResponse
constructor
A new instance of GoogleSecuritySafebrowsingV5SearchUrlsResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleSecuritySafebrowsingV5SearchUrlsResponse
Returns a new instance of GoogleSecuritySafebrowsingV5SearchUrlsResponse.
584 585 586 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 584 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 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.
Corresponds to the JSON property cacheDuration
574 575 576 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 574 def cache_duration @cache_duration end |
#threats ⇒ Array<Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5ThreatUrl>
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.
Corresponds to the JSON property threats
582 583 584 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 582 def threats @threats end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
589 590 591 592 |
# File 'lib/google/apis/safebrowsing_v5/classes.rb', line 589 def update!(**args) @cache_duration = args[:cache_duration] if args.key?(:cache_duration) @threats = args[:threats] if args.key?(:threats) end |