Class: Google::Apis::CloudsearchV1::EnumValuePair
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::EnumValuePair
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb
Overview
The enumeration value pair defines two things: a required string value and an optional integer value. The string value defines the necessary query term required to retrieve that item, such as p0 for a priority item. The integer value determines the ranking of that string value relative to other enumerated values for the same property. For example, you might associate p0 with 0 and define another enum pair such as p1 and 1. You must use the integer value in combination with ordered ranking to set the ranking of a given value relative to other enumerated values for the same property name. Here, a ranking order of DESCENDING for priority properties results in a ranking boost for items indexed with a value of p0 compared to items indexed with a value of p1. Without a specified ranking order, the integer value has no effect on item ranking.
Instance Attribute Summary collapse
-
#integer_value ⇒ Fixnum
The integer value of the EnumValuePair which must be non-negative.
-
#string_value ⇒ String
The string value of the EnumValuePair.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EnumValuePair
constructor
A new instance of EnumValuePair.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ EnumValuePair
Returns a new instance of EnumValuePair.
1032 1033 1034 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1032 def initialize(**args) update!(**args) end |
Instance Attribute Details
#integer_value ⇒ Fixnum
The integer value of the EnumValuePair which must be non-negative. Optional.
Corresponds to the JSON property integerValue
1025 1026 1027 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1025 def integer_value @integer_value end |
#string_value ⇒ String
The string value of the EnumValuePair. The maximum length is 32 characters.
Corresponds to the JSON property stringValue
1030 1031 1032 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1030 def string_value @string_value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1037 1038 1039 1040 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1037 def update!(**args) @integer_value = args[:integer_value] if args.key?(:integer_value) @string_value = args[:string_value] if args.key?(:string_value) end |