Class: Google::Apis::CloudsearchV1::ContextAttribute
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::ContextAttribute
- 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
A named attribute associated with an item which can be used for influencing the ranking of the item based on the context in the request.
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the attribute.
-
#values ⇒ Array<String>
Text values of the attribute.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ContextAttribute
constructor
A new instance of ContextAttribute.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ContextAttribute
Returns a new instance of ContextAttribute.
6766 6767 6768 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6766 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
The name of the attribute. It should not be empty. The maximum length is 32
characters. The name must start with a letter and can only contain letters (A-
Z, a-z) or numbers (0-9). The name will be normalized (lower-cased) before
being matched.
Corresponds to the JSON property name
6757 6758 6759 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6757 def name @name end |
#values ⇒ Array<String>
Text values of the attribute. The maximum number of elements is 10. The
maximum length of an element in the array is 32 characters. The value will be
normalized (lower-cased) before being matched.
Corresponds to the JSON property values
6764 6765 6766 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6764 def values @values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6771 6772 6773 6774 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6771 def update!(**args) @name = args[:name] if args.key?(:name) @values = args[:values] if args.key?(:values) end |