Class: Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry

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

Overview

An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleSecuritySafebrowsingV4ThreatEntry

Returns a new instance of GoogleSecuritySafebrowsingV4ThreatEntry.



565
566
567
# File 'lib/google/apis/safebrowsing_v4/classes.rb', line 565

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

Instance Attribute Details

#digestString

The digest of an executable in SHA256 format. The API supports both binary and hex digests. For JSON requests, digests are base64-encoded. Corresponds to the JSON property digest NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


551
552
553
# File 'lib/google/apis/safebrowsing_v4/classes.rb', line 551

def digest
  @digest
end

#hash_propString

A hash prefix, consisting of the most significant 4-32 bytes of a 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)


558
559
560
# File 'lib/google/apis/safebrowsing_v4/classes.rb', line 558

def hash_prop
  @hash_prop
end

#urlString

A URL. Corresponds to the JSON property url

Returns:

  • (String)


563
564
565
# File 'lib/google/apis/safebrowsing_v4/classes.rb', line 563

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



570
571
572
573
574
# File 'lib/google/apis/safebrowsing_v4/classes.rb', line 570

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