Class: Google::Apis::ThreatintelligenceV1beta::Facet
- Inherits:
-
Object
- Object
- Google::Apis::ThreatintelligenceV1beta::Facet
- 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
-
#facet ⇒ String
Name of the facet.
-
#facet_counts ⇒ Array<Google::Apis::ThreatintelligenceV1beta::FacetCount>
List of counts for the facet (if categorical).
-
#facet_type ⇒ String
The type of the facet.
-
#max_value ⇒ String
Max value of the facet stringified based on type.
-
#min_value ⇒ String
Min value of the facet stringified based on type.
-
#total_count ⇒ Fixnum
Total number of records that contain this facet with ANY value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Facet
constructor
A new instance of Facet.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#facet ⇒ String
Name of the facet. This is also the string that needs to be used in the
filtering expression.
Corresponds to the JSON property facet
1073 1074 1075 |
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1073 def facet @facet end |
#facet_counts ⇒ Array<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_type ⇒ String
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
1085 1086 1087 |
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1085 def facet_type @facet_type end |
#max_value ⇒ String
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
1091 1092 1093 |
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1091 def max_value @max_value end |
#min_value ⇒ String
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
1098 1099 1100 |
# File 'lib/google/apis/threatintelligence_v1beta/classes.rb', line 1098 def min_value @min_value end |
#total_count ⇒ Fixnum
Total number of records that contain this facet with ANY value.
Corresponds to the JSON property totalCount
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 |