Class: Google::Apis::ThreatintelligenceV1beta::Facet

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

Overview

Facet represents a sub element of a resource for filtering. The results from this method are used to populate the filterable facets in the UI.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Facet

Returns a new instance of Facet.



1105
1106
1107
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1105

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

Instance Attribute Details

#facetString

Name of the facet. This is also the string that needs to be used in the filtering expression. Corresponds to the JSON property facet

Returns:

  • (String)


1073
1074
1075
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1073

def facet
  @facet
end

#facet_countsArray<Google::Apis::ThreatintelligenceV1beta::FacetCount>

List of counts for the facet (if categorical). Corresponds to the JSON property facetCounts



1078
1079
1080
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1078

def facet_counts
  @facet_counts
end

#facet_typeString

The type of the facet. Options include "string", "int", "float", "bool", "enum" , "timestamp", "user" and are useful to show the right sort of UI controls when building a AIP-160 style filtering string. Corresponds to the JSON property facetType

Returns:

  • (String)


1085
1086
1087
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1085

def facet_type
  @facet_type
end

#max_valueString

Max value of the facet stringified based on type. Will be populated and formatted the same as min_value. Corresponds to the JSON property maxValue

Returns:

  • (String)


1091
1092
1093
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1091

def max_value
  @max_value
end

#min_valueString

Min value of the facet stringified based on type. This is only populated for facets that have a clear ordering, for types like enum it will be left empty. Timestamps will be formatted using RFC3339. Corresponds to the JSON property minValue

Returns:

  • (String)


1098
1099
1100
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1098

def min_value
  @min_value
end

#total_countFixnum

Total number of records that contain this facet with ANY value. Corresponds to the JSON property totalCount

Returns:

  • (Fixnum)


1103
1104
1105
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1103

def total_count
  @total_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1110
1111
1112
1113
1114
1115
1116
1117
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1110

def update!(**args)
  @facet = args[:facet] if args.key?(:facet)
  @facet_counts = args[:facet_counts] if args.key?(:facet_counts)
  @facet_type = args[:facet_type] if args.key?(:facet_type)
  @max_value = args[:max_value] if args.key?(:max_value)
  @min_value = args[:min_value] if args.key?(:min_value)
  @total_count = args[:total_count] if args.key?(:total_count)
end