Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CompletionSuggestion
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CompletionSuggestion
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1/classes.rb,
lib/google/apis/discoveryengine_v1/representations.rb,
lib/google/apis/discoveryengine_v1/representations.rb
Overview
Autocomplete suggestions that are imported from Customer.
Instance Attribute Summary collapse
-
#alternative_phrases ⇒ Array<String>
Alternative matching phrases for this suggestion.
-
#frequency ⇒ Fixnum
Frequency of this suggestion.
-
#global_score ⇒ Float
Global score of this suggestion.
-
#group_id ⇒ String
If two suggestions have the same groupId, they will not be returned together.
-
#group_score ⇒ Float
The score of this suggestion within its group.
-
#language_code ⇒ String
BCP-47 language code of this suggestion.
-
#suggestion ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1CompletionSuggestion
constructor
A new instance of GoogleCloudDiscoveryengineV1CompletionSuggestion.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1CompletionSuggestion
Returns a new instance of GoogleCloudDiscoveryengineV1CompletionSuggestion.
3066 3067 3068 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3066 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alternative_phrases ⇒ Array<String>
Alternative matching phrases for this suggestion.
Corresponds to the JSON property alternativePhrases
3030 3031 3032 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3030 def alternative_phrases @alternative_phrases end |
#frequency ⇒ Fixnum
Frequency of this suggestion. Will be used to rank suggestions when score is
not available.
Corresponds to the JSON property frequency
3036 3037 3038 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3036 def frequency @frequency end |
#global_score ⇒ Float
Global score of this suggestion. Control how this suggestion would be scored /
ranked.
Corresponds to the JSON property globalScore
3042 3043 3044 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3042 def global_score @global_score end |
#group_id ⇒ String
If two suggestions have the same groupId, they will not be returned together.
Instead the one ranked higher will be returned. This can be used to
deduplicate semantically identical suggestions.
Corresponds to the JSON property groupId
3049 3050 3051 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3049 def group_id @group_id end |
#group_score ⇒ Float
The score of this suggestion within its group.
Corresponds to the JSON property groupScore
3054 3055 3056 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3054 def group_score @group_score end |
#language_code ⇒ String
BCP-47 language code of this suggestion.
Corresponds to the JSON property languageCode
3059 3060 3061 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3059 def language_code @language_code end |
#suggestion ⇒ String
Required. The suggestion text.
Corresponds to the JSON property suggestion
3064 3065 3066 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3064 def suggestion @suggestion end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3071 3072 3073 3074 3075 3076 3077 3078 3079 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 3071 def update!(**args) @alternative_phrases = args[:alternative_phrases] if args.key?(:alternative_phrases) @frequency = args[:frequency] if args.key?(:frequency) @global_score = args[:global_score] if args.key?(:global_score) @group_id = args[:group_id] if args.key?(:group_id) @group_score = args[:group_score] if args.key?(:group_score) @language_code = args[:language_code] if args.key?(:language_code) @suggestion = args[:suggestion] if args.key?(:suggestion) end |