Class: Google::Apis::SafebrowsingV4::ThreatMatch

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

Overview

A match when checking a threat entry in the Safe Browsing threat lists.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ThreatMatch

Returns a new instance of ThreatMatch



755
756
757
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 755

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

Instance Attribute Details

#cache_durationString

The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives. Corresponds to the JSON property cacheDuration

Returns:

  • (String)


726
727
728
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 726

def cache_duration
  @cache_duration
end

#platform_typeString

The platform type matching this threat. Corresponds to the JSON property platformType

Returns:

  • (String)


731
732
733
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 731

def platform_type
  @platform_type
end

#threatGoogle::Apis::SafebrowsingV4::ThreatEntry

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



737
738
739
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 737

def threat
  @threat
end

#threat_entry_metadataGoogle::Apis::SafebrowsingV4::ThreatEntryMetadata

The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type. Corresponds to the JSON property threatEntryMetadata



743
744
745
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 743

def 
  @threat_entry_metadata
end

#threat_entry_typeString

The threat entry type matching this threat. Corresponds to the JSON property threatEntryType

Returns:

  • (String)


748
749
750
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 748

def threat_entry_type
  @threat_entry_type
end

#threat_typeString

The threat type matching this threat. Corresponds to the JSON property threatType

Returns:

  • (String)


753
754
755
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 753

def threat_type
  @threat_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



760
761
762
763
764
765
766
767
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 760

def update!(**args)
  @cache_duration = args[:cache_duration] if args.key?(:cache_duration)
  @platform_type = args[:platform_type] if args.key?(:platform_type)
  @threat = args[:threat] if args.key?(:threat)
  @threat_entry_metadata = args[:threat_entry_metadata] if args.key?(:threat_entry_metadata)
  @threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
  @threat_type = args[:threat_type] if args.key?(:threat_type)
end