Class: Google::Apis::WebriskV1::GoogleCloudWebriskV1SearchHashesResponseThreatHash

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/webrisk_v1/classes.rb,
lib/google/apis/webrisk_v1/representations.rb,
lib/google/apis/webrisk_v1/representations.rb

Overview

Contains threat information on a matching hash.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudWebriskV1SearchHashesResponseThreatHash

Returns a new instance of GoogleCloudWebriskV1SearchHashesResponseThreatHash.



248
249
250
# File 'lib/google/apis/webrisk_v1/classes.rb', line 248

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#expire_timeString

The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives. Corresponds to the JSON property expireTime

Returns:

  • (String)


234
235
236
# File 'lib/google/apis/webrisk_v1/classes.rb', line 234

def expire_time
  @expire_time
end

#hash_propString

A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded. Corresponds to the JSON property hash NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


241
242
243
# File 'lib/google/apis/webrisk_v1/classes.rb', line 241

def hash_prop
  @hash_prop
end

#threat_typesArray<String>

The ThreatList this threat belongs to. This must contain at least one entry. Corresponds to the JSON property threatTypes

Returns:

  • (Array<String>)


246
247
248
# File 'lib/google/apis/webrisk_v1/classes.rb', line 246

def threat_types
  @threat_types
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



253
254
255
256
257
# File 'lib/google/apis/webrisk_v1/classes.rb', line 253

def update!(**args)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @hash_prop = args[:hash_prop] if args.key?(:hash_prop)
  @threat_types = args[:threat_types] if args.key?(:threat_types)
end