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.



1151
1152
1153
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1151

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)


1119
1120
1121
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1119

def facet
  @facet
end

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

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



1124
1125
1126
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1124

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)


1131
1132
1133
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1131

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)


1137
1138
1139
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1137

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)


1144
1145
1146
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1144

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)


1149
1150
1151
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1149

def total_count
  @total_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1156
1157
1158
1159
1160
1161
1162
1163
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1156

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